We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a85d7f commit 24729eeCopy full SHA for 24729ee
client/version.cmd
@@ -0,0 +1,25 @@
1
+@echo off
2
+setlocal enabledelayedexpansion
3
+
4
+set "LERNA_FILE=..\lerna.json"
5
6
+if not exist "%LERNA_FILE%" (
7
+ echo Error: %LERNA_FILE% does not exist.
8
+ exit /b 1
9
+)
10
11
+for /f "tokens=2 delims=:, " %%a in ('findstr "version" "%LERNA_FILE%"') do (
12
+ set "VERSION=%%~a"
13
14
15
+if "!VERSION!"=="" (
16
+ echo Error: Unable to extract version from %LERNA_FILE%.
17
18
19
20
+if not exist "src\" mkdir src
21
+echo { "version": !VERSION! } > src\info.json
22
+if errorlevel 1 (
23
+ echo Error: Failed to write src\info.json
24
25
0 commit comments