From a92058d61e12790ce659b4be500ff9152201e88b Mon Sep 17 00:00:00 2001 From: Rechi Date: Wed, 13 Dec 2017 14:47:34 +0100 Subject: [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 --- project/Win32BuildSetup/extract_git_rev.bat | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'project') 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% -- cgit v1.2.3