-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathpublish.cmd
47 lines (38 loc) · 1.12 KB
/
publish.cmd
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
del /f/s/q bin > nul && rmdir /s/q bin
if EXIST bin goto ERROR
pushd src\tweetz.core
echo(
echo --- Build framework-dependent ---
echo(
dotnet publish -f net7.0-windows -r win10-x86 -c Release --self-contained false --output ../../bin/framework-dependent
if ERRORLEVEL 1 goto ERROR
echo(
@echo --- Build self-contained ---
echo(
dotnet publish -f net7.0-windows -r win10-x86 -c Release --self-contained true --output ../../bin/self-contained
if ERRORLEVEL 1 goto ERROR
echo(
@echo --- Build single-exe---
echo(
dotnet publish -f net7.0-windows -r win10-x86 -c Release --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --output ../../bin/single-exe
if ERRORLEVEL 1 goto ERROR
popd
echo(
echo --- Build installer ---
iscc /Q tweetz.core.setup.iss
if ERRORLEVEL 1 goto ERROR
pushd bin
echo(
echo(
echo --- Build zip archives ---
7z a -bso0 -bsp0 -r dist/tweetz-framework-dependent.zip ./framework-dependent/*
if ERRORLEVEL 1 goto ERROR
7z a -bso0 -bsp0 -r dist/tweetz-self-contained.zip ./self-contained/*
if ERRORLEVEL 1 goto ERROR
popd
goto END
:ERROR
popd
echo Oooooops...
:END