-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuild.ps1
More file actions
63 lines (34 loc) · 1.63 KB
/
build.ps1
File metadata and controls
63 lines (34 loc) · 1.63 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
56
57
58
59
60
61
62
63
# normal package
# build strategy
# delete bin -> build generator -> copy generator -> build frent -> push
# detete bin -> build generator -> copy generator -> tmp csproj -> build frent.unity -> delete tmp csproj -> push
echo "Building Generator"
rm Frent\bin\Release\* -Recurse
dotnet build -c Release Frent.Generator\Frent.Generator.csproj
Copy-Item -Path ".\Frent.Generator\bin\Release\netstandard2.0\Frent.Generator.dll" -Destination ".\Frent\bin\Release\"
echo "Building Frent"
dotnet build -c Release Frent\Frent.csproj /p:Publish=true
$package = Get-ChildItem -Path ".\Frent\bin\Release" -Filter "*.nupkg" | Select-Object -First 1
echo "Pushing package $package"
pause
dotnet nuget push ".\Frent\bin\Release\$package" --api-key $Env:NUGET_API_KEY --source https://api.nuget.org/v3/index.json
pause
clear
# unity package
rm Frent\bin\Release\* -Recurse
echo "Building Unity Generator"
dotnet build -c Release Frent.Generator\Frent.Generator.csproj /p:Unity="#UNITY"
Copy-Item -Path ".\Frent.Generator\bin\Release\netstandard2.0\Frent.Generator.dll" -Destination ".\Frent\bin\Release\"
echo "Building Frent.Unity"
# copy tmp csproj
Copy-Item -Path ".\Frent\Frent.csproj" -Destination ".\Frent\Frent.Unity.csproj"
dotnet build -c Release Frent\Frent.Unity.csproj /p:Publish=true
# cleanup
rm ".\Frent\Frent.Unity.csproj"
$package = Get-ChildItem -Path ".\Frent\bin\Release" -Filter "*.nupkg" | Select-Object -First 1
echo "Pushing package $package"
pause
dotnet nuget push ".\Frent\bin\Release\$package" --api-key $Env:NUGET_API_KEY --source https://api.nuget.org/v3/index.json
pause
echo "DONE! Don't forget to update docs!!!!"
pause