Display the next version using native git commands (#6091)

This commit is contained in:
Jace Browning
2025-04-01 23:06:38 -04:00
committed by GitHub
parent b5f81b9384
commit 4e36e398ee

View File

@ -1,9 +1,9 @@
# Requires access to an environment variable GH_TOKEN #!/bin/bash
# If you are in the path of the git repository the gh release list will automatically point to that git repo set -euo pipefail
# aka cd /some/path/modeling-app
# $ gh release list # Fetch the latest release tag
# Get the latest semver tag from git git fetch --all --tags
latest_tag=$(gh release list --json name,isLatest --jq '.[] | select(.isLatest)|.name') latest_tag=$(git tag --sort=-v:refname | grep "^v[0-9]" | head -n 1)
# Function to bump version numbers # Function to bump version numbers
bump_version() { bump_version() {