aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2017-12-13 14:47:34 +0100
committerRechi <Rechi@users.noreply.github.com>2017-12-13 14:47:34 +0100
commita92058d61e12790ce659b4be500ff9152201e88b (patch)
treee78c77181e2ee97a7c3d2aa694a4305c65579a76 /project
parent1c3e8da81578492575a227ecf49c2ca757cd5e99 (diff)
[jenkins] improve revsion, date and branch name detection
- more exact check for pull request in attached state - append head or merge for a pull request in attached state - favour branch --points-at over branch --contains in detached state - detect pull requests in detached state - replace slashes in branch names with a dash - enlarge commit hash as it sometimes isn't distinct anymore
Diffstat (limited to 'project')
-rw-r--r--project/Win32BuildSetup/extract_git_rev.bat4
1 files changed, 1 insertions, 3 deletions
diff --git a/project/Win32BuildSetup/extract_git_rev.bat b/project/Win32BuildSetup/extract_git_rev.bat
index 936eab779a..2467c11ed9 100644
--- a/project/Win32BuildSetup/extract_git_rev.bat
+++ b/project/Win32BuildSetup/extract_git_rev.bat
@@ -30,9 +30,7 @@ GOTO :extract
:extract
-FOR /F "tokens=1-4 delims=-" %%A IN ('"%GITEXE% rev-list HEAD -n 1 --date=short --pretty=format:"%%cd-%%h""') DO (
-SET GIT_REV=%%A%%B%%C-%%D
-)
+FOR /F %%A IN ('"%GITEXE% --no-pager show -s --abbrev=8 --date=format:"%%Y%%m%%d" --pretty=format:"%%cd-%%h""') DO SET GIT_REV=%%A
echo %GIT_REV%