-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_portable.ps1
27 lines (20 loc) · 1.27 KB
/
build_portable.ps1
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
# this script should be run from the root directory of the fablab solution
# first we clear the nuget caches so we don't have old dependencies in there. This might be gratuitous but doesn't hurt
# then we clean the old files, restore the nuget packages, remove any previously built nugets from ./nuget and build the projects on local config. This builds all projects.
# After FabLab.csproj is built, all non-system dlls in the output folder are copied to .\NugetBuilder\folder for packing
# when dependencies.csproj is built directly afterwards, these dlls are packed into a nuget (name: dependencies, version taken from dependencies.csproj)
# this nuget ends up in the .\nuget
dotnet restore /p:configuration=local
dotnet clean /p:configuration=local
dotnet nuget locals all --clear
dotnet restore /p:configuration=local
Remove-Item nuget\*
dotnet build /p:configuration=local
# we then clear the cache again, just to be sure
dotnet nuget locals all --clear
Write-Host "Hi"
# then we build the projects on release config. This builds only fablab.csproj, with the .\nuget folder as an additional restore source (defined in fablab.csproj)
dotnet restore /p:configuration=release
dotnet build /p:configuration=release
# for convenience, we restore local again
dotnet restore /p:configuration=local