forked from erikdarlingdata/PerformanceMonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage-release.cmd
More file actions
50 lines (41 loc) · 1.03 KB
/
package-release.cmd
File metadata and controls
50 lines (41 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
echo.
echo ========================================
echo Packaging Performance Monitor Release
echo ========================================
echo.
:: Get version from Dashboard csproj
for /f "tokens=2 delims=<>" %%a in ('findstr "<Version>" Dashboard\Dashboard.csproj') do set VERSION=%%a
if "%VERSION%"=="" (
echo ERROR: Could not determine version from Dashboard.csproj.
exit /b 1
)
echo Version: %VERSION%
echo.
:: Build everything first
call build-all.cmd
if %ERRORLEVEL% neq 0 (
echo.
echo ERROR: Build failed! Cannot package release.
exit /b 1
)
echo.
echo ========================================
echo Release Summary
echo ========================================
echo.
echo Version: %VERSION%
echo.
echo Artifacts:
echo.
for %%F in (releases\*.zip) do (
set SIZE=%%~zF
set /a SIZE_MB=!SIZE! / 1048576
echo %%~nxF ^(!SIZE_MB! MB^)
)
echo.
echo Ready for GitHub Release upload.
echo.
endlocal