forked from erikdarlingdata/PerformanceMonitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-lite.cmd
More file actions
47 lines (37 loc) · 1.21 KB
/
build-lite.cmd
File metadata and controls
47 lines (37 loc) · 1.21 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
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
echo.
echo ========================================
echo Building Performance Monitor Lite
echo ========================================
echo.
:: Get version from csproj
for /f %%a in ('powershell -Command "([xml](Get-Content Lite\PerformanceMonitorLite.csproj)).Project.PropertyGroup.Version | Where-Object { $_ }"') do set VERSION=%%a
echo Version: %VERSION%
echo.
:: Clean and publish
echo Publishing Lite Edition...
dotnet publish Lite\PerformanceMonitorLite.csproj -c Release -o publish\Lite
if %ERRORLEVEL% neq 0 (
echo.
echo ERROR: Build failed!
exit /b 1
)
:: Create ZIP
echo.
echo Creating ZIP package...
set ZIPNAME=PerformanceMonitorLite-%VERSION%.zip
if exist "releases\%ZIPNAME%" del "releases\%ZIPNAME%"
if not exist "releases" mkdir releases
powershell -Command "Compress-Archive -Path 'publish\Lite\*' -DestinationPath 'releases\%ZIPNAME%' -Force"
echo.
echo ========================================
echo Build Complete!
echo ========================================
echo.
echo Output: releases\%ZIPNAME%
echo.
:: Show size
for %%A in ("releases\%ZIPNAME%") do echo Size: %%~zA bytes
endlocal