Skip to content

Commit b0de9a0

Browse files
committed
scripts: the update-version.bash defaults to sticky HEAD, unless HEAD is specified
1 parent 8bded22 commit b0de9a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/update-version.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323

2424
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
2525
SCRIPT_ROOT=$(realpath "$0")
26-
ROOT_REV="$2"
26+
ROOT_REV="${2}"
2727
ROOT_TS=""
2828

2929
if [[ -z "$TMP_DIR" ]]; then
@@ -35,7 +35,7 @@ fi
3535
perform() {
3636
[[ -d "$1" ]] || git clone "git://git.proxmox.com/git/${3:-$1}.git" "$1" 2>/dev/null
3737

38-
if [[ -z "$ROOT_REV" ]] || [[ -z "$ROOT_TS" ]]; then
38+
if [[ "$ROOT_REV" == "HEAD" ]] || [[ -z "$ROOT_TS" ]]; then
3939
REPO_REV=$(git -C "$1" rev-parse "${ROOT_REV:-HEAD}")
4040
ROOT_TS=$(git -C "$1" log -1 --format=%ct "$REPO_REV")
4141
else

0 commit comments

Comments
 (0)