Skip to content

Commit 71c669d

Browse files
committed
Fix package script to automatically create json
Former-commit-id: 2cf0952
1 parent 30804f8 commit 71c669d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

extras/package.sh

+18-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,24 @@ fi
88
VERSION=`cat platform.txt | grep "version=" | cut -f2 -d"="`
99
echo $VERSION
1010

11+
FILENAME=ArduinoCore-renesas-$VERSION.tar.bz2
12+
1113
CORE_BASE=`basename $PWD`
1214
cd ..
13-
tar --exclude='*.vscode*' --exclude='*.git*' --exclude='*e2studio*' --exclude='*extras*' -cjhvf ArduinoCore-renesas-$VERSION.tar.bz2 $CORE_BASE
15+
tar --exclude='*.vscode*' --exclude='*.git*' --exclude='*e2studio*' --exclude='*extras*' -cjhvf $FILENAME $CORE_BASE
1416
cd -
17+
18+
mv ../$FILENAME .
19+
20+
CHKSUM=`sha256sum $FILENAME | awk '{ print $1 }'`
21+
SIZE=`wc -c $FILENAME | awk '{ print $1 }'`
22+
23+
cat extras/package_index.json.template |
24+
# sed "s/%%BUILD_NUMBER%%/${BUILD_NUMBER}/" |
25+
# sed "s/%%CURR_TIME%%/${CURR_TIME_SED}/" |
26+
sed "s/%%VERSION%%/${VERSION}/" |
27+
sed "s/%%FILENAME%%/${FILENAME}/" |
28+
sed "s/%%CHECKSUM%%/${CHKSUM}/" |
29+
sed "s/%%SIZE%%/${SIZE}/" > package_renesas_${VERSION}_index.json
30+
31+
cat package_renesas_${VERSION}_index.json

0 commit comments

Comments
 (0)