mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-30 06:50:21 +00:00
10 lines
No EOL
352 B
Batchfile
10 lines
No EOL
352 B
Batchfile
@echo off
|
|
: Export rev to env, for the artifact
|
|
FOR /F "tokens=*" %%g IN ('git rev-parse --short HEAD') do (SET AppRev=%%g)
|
|
: Get git root directory
|
|
FOR /F "tokens=*" %%h IN ('git rev-parse --show-toplevel') do (SET root=%%h)
|
|
: get commit hash for version file
|
|
set rev={"rev":"%AppRev%"}
|
|
|
|
: Save to version file
|
|
echo %rev% > %root%/public/version.json |