Fetch the newest upstream version from github api (#17)

* Set the newest upstream version as default

Instead of hardcoding the default version the latest upstream release should be used.

* Add curl as dependency
This commit is contained in:
Masgalor 2020-06-27 12:45:48 +00:00 committed by GitHub
parent 5f78955231
commit 7e9b0d79bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Make sure you have the required build dependencies:
* docker
* git
* patch
* curl
Then:

View File

@ -18,7 +18,7 @@ while getopts ":r:o:d:" opt; do
;;
esac
done
if [ -z "$REF" ]; then REF="1.15.0"; fi
if [ -z "$REF" ]; then REF=$(curl -s https://api.github.com/repos/dani-garcia/bitwarden_rs/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c 1-); fi
if [ -z "$OS_VERSION_NAME" ]; then OS_VERSION_NAME='buster'; fi
if [ -z "$DB_TYPE" ]; then DB_TYPE="sqlite"; fi