mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 11:33:10 +00:00
No need to pass version to scripts/tag
This commit is contained in:
parent
9865851080
commit
62587ad4cf
2 changed files with 13 additions and 1 deletions
|
@ -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:-}"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue