feat(installer): download rc with --rc #123

Merged
decentral1se merged 2 commits from knoflook/abra:main into main 2021-11-11 17:07:46 +00:00
1 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,15 @@
ABRA_VERSION="0.3.0-alpha"
ABRA_RELEASE_URL="https://git.coopcloud.tech/api/v1/repos/coop-cloud/abra/releases/tags/$ABRA_VERSION"
RC_VERSION="0.3.1-rc1"
RC_VERSION_URL="https://git.coopcloud.tech/api/v1/repos/coop-cloud/abra/releases/tags/$RC_VERSION"
for arg in "$@"; do
if [ "$arg" == "--rc" ]; then
ABRA_VERSION="$RC_VERSION"
ABRA_RELEASE_URL="$RC_VERSION_URL"
fi
done
function show_banner {
echo ""
@ -35,6 +44,7 @@ function install_abra_release {
exit 1
fi
# FIXME: support different architectures
PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)
FILENAME="abra_"$ABRA_VERSION"_"$PLATFORM""
@ -79,6 +89,7 @@ function install_abra_release {
echo "abra installed to $HOME/.local/bin/abra"
}
function run_installation {
show_banner
install_abra_release