From 270b4f702bdd334582e91fb9bbf80c65f7e60ca3 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 1 Jul 2016 01:05:25 +0200 Subject: [PATCH] precommit-hook.sh: Automatically adjust version number after a release. --- patches/patchinstall.sh | 2 +- precommit-hook.sh | 5 +++++ staging/VERSION | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index ebdc1da4..06e849e4 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -57,7 +57,7 @@ upstream_commit() # Show version information version() { - echo "Wine Staging 1.9.13" + echo "Wine Staging 1.9.14 (unreleased)" echo "Copyright (C) 2014-2016 the Wine Staging project authors." echo "" echo "Patchset to be applied on upstream Wine:" diff --git a/precommit-hook.sh b/precommit-hook.sh index 442492fd..a6b69ca7 100755 --- a/precommit-hook.sh +++ b/precommit-hook.sh @@ -18,6 +18,11 @@ if git status --porcelain "patches" | grep -v "^.\\?.*\\.py$" | grep "^.[^ ]" &> exit 1 fi +if ! git status --porcelain "staging/VERSION" | grep "^M." &> /dev/null; then + perl -i -pe 's/(\d+)$/($1 + 1)." (unreleased)"/e' "staging/VERSION" + git add "staging/VERSION" +fi + git diff --cached --name-status | while read status file; do if [[ "$file" =~ ^patches/ ]] || [[ "$file" =~ ^staging/ ]]; then warning "UPDATING AUTOGENERATED FILES" diff --git a/staging/VERSION b/staging/VERSION index 6b94ddd5..6cea84dd 100644 --- a/staging/VERSION +++ b/staging/VERSION @@ -1 +1 @@ -Wine Staging 1.9.13 +Wine Staging 1.9.14 (unreleased)