archive also release tar.gz along side with appImage
Some checks failed
gitea-sync/antos-appimage/pipeline/head There was a failure building this commit

This commit is contained in:
dany 2022-10-05 20:12:22 +02:00
parent fcb5e98b04
commit 11dd8003a5

View File

@ -13,12 +13,15 @@ archname=x86_64
case $arch in
amd64|x86_64)
archname=x86_64
suffix=x86_64
;;
aarch64|arm64)
archname=aarch64
suffix=aarch64
;;
armv7l|arm)
archname=armhf
suffix=armv7l
;;
*)
echo "Unkown architecture"
@ -39,6 +42,20 @@ echo "Building app image for $arch"
mkdir antos.AppDir
# copy all neccessary file
cp -rf $W/backend/build/$arch/* antos.AppDir/
cp -rf $W/frontend/$tag/build/* antos.AppDir/
cp antd-config.ini antos.AppDir/opt/www/
cp runner.ini antos.AppDir/opt/www/
# create binary tar.gz
[ ! -d "build/$tag" ] && mkdir -p build/$tag
cd antos.AppDir
tar cvzf ../build/$tag/AntOS_$suffix.tar.gz
cd ../
# AppRun
cat << "EOF" >> antos.AppDir/AppRun
#!/bin/sh
@ -70,24 +87,8 @@ Categories=Utility;
Terminal=true
EOF
# copy all neccessary file
cp antos.png antos.AppDir
cp -rf $W/backend/build/$arch/* antos.AppDir/
cp -rf $W/frontend/$tag/build/* antos.AppDir/
cp antd-config.ini antos.AppDir/opt/www/
cp runner.ini antos.AppDir/opt/www/
tree antos.AppDir
./appimagetool.AppImage --runtime-file runtime-$archname antos.AppDir build/AntOS_$archname-$tag.AppImage
cd build
case $arch in
armv7l|arm)
mv AntOS_$archname-$tag.AppImage AntOS_armv7l-$tag.AppImage
;;
*)
;;
esac
./appimagetool.AppImage --runtime-file runtime-$archname antos.AppDir build/$tag/AntOS_$suffix.AppImage