25 lines
775 B
Bash
25 lines
775 B
Bash
|
#!/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
|