-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild-hosted.ps1
More file actions
28 lines (22 loc) · 1.24 KB
/
build-hosted.ps1
File metadata and controls
28 lines (22 loc) · 1.24 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
# Make sure you have this in your project:
#
# <DefineConstants>USE_RAZORPAGES;BUILD_PACKAGE</DefineConstants>
#
# Note:
# For Razor Compilation `PublishTrimmed` does not work because
# it relies on dynamic interfaces when compiling Razor at runtime.
# If you compile with Razor disabled, or don't plan on using Razor
# with this LiveReloadServer, you can set /p:PublishTrimmed=true
# to cut the size of the exe in half.
if (test-path './build/Hosted' -PathType Container) { remove-item .\build\Hosted -Recurse -Force }
# Single File Exe output
dotnet publish -c Release -o ./build/Hosted
copy-Item ./build/Hosted/LiveReloadServer.exe ./build/Hosted/LiveReloadWebServer.exe
remove-item ./build/Hosted/LiveReloadServer.exe
# Sign exe
# .\signtool.exe sign /v /n "West Wind Technologies" /tr "http://timestamp.digicert.com" /td SHA256 /fd SHA256 ".\build\Hosted\LiveReloadWebServer.exe"
# .\signtool.exe sign /v /n "West Wind Technologies" /tr "http://timestamp.digicert.com" /td SHA256 /fd SHA256 ".\build\Hosted\LiveReloadWebServer.dll"
.\signfile -file ".\build\Hosted\LiveReloadWebServer.exe" `
-file2 ".\build\Hosted\LiveReloadServer.dll"
del ".\LiveReloadServer-Hosted.zip"
7z a -tzip -r ".\LiveReloadServer-Hosted.zip" "./build/Hosted/*.*"