-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.ps1
More file actions
55 lines (43 loc) · 1.84 KB
/
build.ps1
File metadata and controls
55 lines (43 loc) · 1.84 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
51
52
53
54
55
$version="1.03"
cd src
#dotnet clean CommodoreBasicReformatter\CommodoreBasicReformatter.csproj
#dotnet build CommodoreBasicReformatter\CommodoreBasicReformatter.csproj
function buildAll([bool] $selfcontained)
{
rmdir CommodoreBasicReformatter\bin\Debug -Recurse -Force
if($selfcontained){$arg ="true"}
else { $arg = "false"}
"arg="+$arg
# win
dotnet publish CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r win-x64 --self-contained $arg
dotnet clean CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r win-x64
dotnet publish CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r win-x86 --self-contained $arg
dotnet clean CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r win-x86
# linux
dotnet publish CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r linux-x64 --self-contained $arg
dotnet clean CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r linux-x64
dotnet publish CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r linux-x64 --self-contained $arg
dotnet clean CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r linux-arm
# mac
dotnet publish CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r osx-x64 --self-contained $arg
dotnet clean CommodoreBasicReformatter\CommodoreBasicReformatter.csproj -r osx-x64
cd CommodoreBasicReformatter\bin\debug\netcoreapp2.2
$name=""
if($selfcontained) {
$name ="CommodoreBasicReformatter$($version)_selfcontained.zip"
}
else {
$name ="CommodoreBasicReformatter$($version).zip"
}
"7zip"
& 'C:\Program Files\7-Zip\7z.exe' a -bb0 -bd -tzip $($name) .
"Move"
mv *.zip ..\..\..\..\..
del *.zip
"CD"
cd ..\..\..\..\..
}
buildAll($False)
# wait for .net core 3 - has singlefile and reducesize flags
#cd src
#buildAll($True)