summaryrefslogtreecommitdiff
path: root/tools/get-scala-revision.bat
blob: ed3ade8a3e54bf3fa487d257feb3a94cb4b3139c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@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
  echo 0
)

:end
@endlocal