No need to pass version to scripts/tag

This commit is contained in:
Denis Isidoro 2020-03-16 08:43:32 -03:00
parent 9865851080
commit 62587ad4cf
2 changed files with 13 additions and 1 deletions

View file

@ -59,6 +59,15 @@ latest_version_released() {
| sed 's|releases/tag/v||'
}
version_from_toml() {
cat "${NAVI_HOME}/Cargo.toml" \
| grep version \
| head -n1 \
| awk '{print $NF}' \
| tr -d '"' \
| tr -d "'"
}
asset_url() {
local -r version="$1"
local -r variant="${2:-}"

View file

@ -2,8 +2,11 @@
set -euo pipefail
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
source "${NAVI_HOME}/scripts/install"
version="$1"
version="${1:-$(version_from_toml)}"
echo "version: $version..."
sleep 2
git tag -a "v${version}" -m 'WIP version written in Rust. Use 1.0.0 instead'
git push origin --tags