test title release and SU releases

This commit is contained in:
Heavybullets8 2022-08-23 12:02:41 -06:00
parent bd74270668
commit 178079a39f
3 changed files with 6 additions and 1 deletions

View File

@ -31,6 +31,7 @@ echo '| | | | __/ (_| |\ V /| |_| /\__/ / (__| | | | |_) | |_ '
echo '\_| |_/\___|\__,_| \_/ \__, \____/ \___|_| |_| .__/ \__|'
echo ' __/ | | | '
echo ' |___/ |_| '
echo "$hs_version"
echo
}
export -f title

View File

@ -16,6 +16,7 @@ if git diff --name-only origin/$branch | grep -qs ".sh" ; then
[[ "$i" == "--self-update" ]] && unset "args[$count]" && break
((count++))
done
curl --silent "https://api.github.com/repos/HeavyBullets8/heavy_script/releases/latest" | jq -r .tag_name,.body
[[ -z ${args[*]} ]] && echo -e "No more arguments, exiting..\n\n" && exit
echo -e "Running the new version...\n\n"
sleep 5
@ -23,7 +24,8 @@ if git diff --name-only origin/$branch | grep -qs ".sh" ; then
# Now exit this old instance
exit
else
echo -e "HeavyScript is already the latest version\n\n"
echo -e "HeavyScript is already the latest version:\n\n"
echo "$hs_version"
fi
}
export -f self_update

View File

@ -1,5 +1,7 @@
#!/bin/bash
#Version
hs_version=$(curl --silent "https://api.github.com/repos/HeavyBullets8/heavy_script/releases/latest" | jq -r .tag_name)
# cd to script, this ensures the script can find the source scripts below, even when ran from a seperate directory
script=$(readlink -f "$0")