diff options
Diffstat (limited to 'tools/get-scala-revision.bat')
-rw-r--r-- | tools/get-scala-revision.bat | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/get-scala-revision.bat b/tools/get-scala-revision.bat new file mode 100644 index 0000000000..f4dc24b71f --- /dev/null +++ b/tools/get-scala-revision.bat @@ -0,0 +1,22 @@ +@echo off +rem +rem Usage: get-scala-revison.bat [dir] +rem Figures out current scala revision of a git clone. +rem +rem If no dir is given, current working dir is used. + +@setlocal +set _DIR= +if "%*"=="" ( + for /f "delims=;" %%i in ('cd') do set "_DIR=%%i" +) else ( + set "_DIR=%~1" +) +cd %_DIR% + +if exist .git\NUL ( + git describe HEAD --abbrev=7 --match dev +) + +:end +@endlocal |