From c6bed5cb193a7d42834cedee12fe6ee559f17620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 31 Jan 2018 13:31:09 +0100 Subject: Add option to change taget commit in updater-ng-auto --- utils/updater-ng-auto.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/updater-ng-auto.sh b/utils/updater-ng-auto.sh index a4d4194..d9157a0 100755 --- a/utils/updater-ng-auto.sh +++ b/utils/updater-ng-auto.sh @@ -2,6 +2,7 @@ # This script check if updater doesn't contain new commit and if so it bumps # automatically. +COMMIT=HEAD UPDATER_REPO=https://kkoci@gitlab.labs.nic.cz/turris/updater.git UPDATER_REPO_PATH=/tmp/myrepo_updater_repo @@ -18,9 +19,9 @@ else git $GIT_ARGS fetch $UPDATER_REPO master:master fi # Get info -HASH="$(git $GIT_ARGS rev-parse HEAD)" -VERSION="$(git $GIT_ARGS describe --abbrev=0 --tags | sed 's/^v//')" -RELEASE="$(($(git $GIT_ARGS rev-list --count v$VERSION..HEAD) + 1))" +HASH="$(git $GIT_ARGS rev-parse $COMMIT)" +VERSION="$(git $GIT_ARGS describe --abbrev=0 --tags $COMMIT | sed 's/^v//')" +RELEASE="$(($(git $GIT_ARGS rev-list --count v$VERSION..$COMMIT) + 1))" VERSION="$VERSION.99999" # Now replace stuff in Makefile -- cgit v1.2.3