Skip to content

Commit 175bca3

Browse files
committed
Produce a simple manifest.json, exposing metadatas
1 parent 2435879 commit 175bca3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

sample/prepare

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@ PI_INSTALL_PATH=$UPDATE_PATH/sample_update/files/install/home/pi
1414
echo "Copying pre folder"
1515
cp pre/* sample_update/files/install/ -r
1616

17+
echo "Creating manifest file"
18+
19+
cd $BACKEND
20+
21+
backendGIT=$(git rev-parse HEAD)
22+
23+
cat >./manifest.json <<EOF
24+
{
25+
"backendCommit": "$backendGIT"
26+
}
27+
EOF
28+
29+
echo "Produced manifest.json:"
30+
cat manifest.json
31+
32+
cd $UPDATE_PATH
33+
1734
echo "Copying backend"
1835
cp $BACKEND $PI_INSTALL_PATH/coderbot -r
1936
echo "Cleaning up virtualenv and git artifacts"
@@ -22,6 +39,8 @@ rm -rf $PI_INSTALL_PATH/coderbot/__pycache__
2239
rm -rf $PI_INSTALL_PATH/coderbot/lib64
2340
rm -rf $PI_INSTALL_PATH/coderbot/.git
2441

42+
rm $BACKEND/manifest.json
43+
2544
# TODO: generate backend metadata
2645

2746
echo "Building frontend"

0 commit comments

Comments
 (0)