summaryrefslogtreecommitdiff
path: root/tools/get-scala-commit-date.bat
diff options
context:
space:
mode:
Diffstat (limited to 'tools/get-scala-commit-date.bat')
-rw-r--r--tools/get-scala-commit-date.bat24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/get-scala-commit-date.bat b/tools/get-scala-commit-date.bat
new file mode 100644
index 0000000000..a07155533f
--- /dev/null
+++ b/tools/get-scala-commit-date.bat
@@ -0,0 +1,24 @@
+@echo off
+rem
+rem Usage: get-scala-revison.bat [dir]
+rem Figures out current scala commit date 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%
+
+rem TODO - Check with a real windows user that this works!
+if exist .git\NUL (
+ for /f "tokens=1delims= " in ('git log --format="%ci" -1') do set commitdate=%%a
+ echo %commitdate%
+)
+
+:end
+@endlocal