-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.bat
More file actions
48 lines (42 loc) · 1.37 KB
/
build.bat
File metadata and controls
48 lines (42 loc) · 1.37 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
@echo off
echo ================================
echo Grammar Fixer - Build Script / TheHolyOneZ
echo ================================
echo.
set BUILD_NUM=%RANDOM%
echo [1/3] Cleaning previous builds...
if exist "publish" rmdir /s /q "publish" 2>nul
if exist "GrammarFixer\bin" rmdir /s /q "GrammarFixer\bin" 2>nul
if exist "GrammarFixer\obj" rmdir /s /q "GrammarFixer\obj" 2>nul
timeout /t 1 /nobreak >nul
echo [2/3] Restoring packages...
dotnet restore GrammarFixer\GrammarFixer.csproj
echo [3/3] Publishing standalone executable...
dotnet publish GrammarFixer\GrammarFixer.csproj ^
--configuration Release ^
--runtime win-x64 ^
--self-contained true ^
--output publish ^
/p:PublishSingleFile=true ^
/p:IncludeNativeLibrariesForSelfExtract=true ^
/p:EnableCompressionInSingleFile=true ^
/p:PublishTrimmed=false ^
/p:Version=1.0.%BUILD_NUM%
echo.
if exist "publish\GrammarFixer.exe" (
echo ================================
echo BUILD SUCCESSFUL!
echo ================================
echo.
ren "publish\GrammarFixer.exe" "GrammarFixer_v%BUILD_NUM%.exe"
echo Location: publish\GrammarFixer_v%BUILD_NUM%.exe
cd publish
dir GrammarFixer_*.exe
cd ..
) else (
echo ================================
echo BUILD FAILED - EXE NOT FOUND!
echo ================================
)
echo.
pause