hs.scripts/updates/fluffychat.sh

25 lines
775 B
Bash
Raw Normal View History

2024-04-25 13:49:12 +02:00
#!/bin/bash
set -e
# ! wip !
# if failing: $HOME/tools/flutter/bin/flutter upgrade
basedir=$HOME/fluffychat
flutter=$HOME/tools/flutter/bin/flutter
release=`curl -L https://api.github.com/repos/krille-chan/fluffychat/releases/latest -s | jq -r '.tag_name'`
current=v`cat $basedir/build/web/version.json|jq .version|tr -d '"'`
echo ">>> latest Fluffychat appears to be $release, we are on $current."
if [[ ! $release == $current ]]
then
echo ">>> checking out Fluffychat $release"
cd $HOME/fluffychat
git fetch
git checkout $release
$flutter build web --release
echo ">>> done."
echo ">>> Fluffychat is now at $release."
else
echo ">>> nothing to do:"
cat $basedir/build/web/version.json|jq
fi