Skip to content

Commit fd2e491

Browse files
Add a packaging step
1 parent 695e597 commit fd2e491

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22

3+
rel=${rel:-2.5.0}
34
make="-j 2"
45
which nproc >& /dev/null && make="-j $(($(nproc) + 1))"
56
gitopt="--depth 1 --single-branch"
@@ -248,5 +249,19 @@ for sh in post/${gcc}*.sh; do
248249
[ -x "$sh" ] && $sh ${EXT}
249250
done
250251

252+
echo "-------- creating package tgz"
253+
tarball=$HOST.xtensa-lx106-elf-$(git rev-parse --short HEAD).tgz
254+
(rm -rf pkg && mkdir pkg && cd pkg && cp -a ../xtensa-lx106-elf${EXT} xtensa-lx106-elf && tar zcf ../${tarball} xtensa-lx106-elf/)
255+
tarballsize=$(stat -c%s ${tarball})
256+
tarballsha256=$(sha256sum ${tarball} | cut -f1 -d" ")
257+
( echo ' {' &&
258+
echo ' "host": "'$HOST'",' &&
259+
echo ' "url": "https://github.com/earlephilhower/esp-quick-toolchain/releases/download/'${rel}'/'${tarball}'",' &&
260+
echo ' "archiveFileName": "'${tarball}'",' &&
261+
echo ' "checksum": "SHA-256:'${tarballsha256}'",' &&
262+
echo ' "size": "'${tarballsize}'"' &&
263+
echo ' },') > ${tarball}.json
264+
rm -rf pkg
265+
251266
echo "all done (${install})"
252267
rm -f ${unfinished}

0 commit comments

Comments
 (0)