File tree Expand file tree Collapse file tree 5 files changed +55
-0
lines changed Expand file tree Collapse file tree 5 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 7777 - name : Add installer icon
7878 if : contains(matrix.architecture, 'win-')
7979 run : cp ./media/icon.ico ./${{ env.release }}
80+ - name : Update version in beta installer
81+ if : contains(matrix.architecture, 'win-') && contains('${{ github.ref_name }}', '-beta')
82+ run : |
83+ $content = Get-Content ./install-beta.iss
84+ $content -replace '#define MyAppVersion .*', "#define MyAppVersion `"$("${{ github.ref_name }}".Substring(1))`"" | Set-Content ./install-beta.iss
8085 - name : Set installer file name
8186 id : installer
8287 if : contains(matrix.architecture, 'win-')
Original file line number Diff line number Diff line change 22; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33
44#define MyAppName " Dev Proxy Beta"
5+ ; for local use only. In production replaced by a command line arg
56#define MyAppSetupExeName " dev-proxy-installer-win-x64-0.17.0-beta.4"
67#define MyAppVersion " 0.17.0-beta.4"
78#define MyAppPublisher " Microsoft"
Original file line number Diff line number Diff line change 22; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33
44#define MyAppName " Dev Proxy"
5+ ; for local use only. In production replaced by a command line arg
56#define MyAppSetupExeName " dev-proxy-installer-win-x64-0.17.0"
67#define MyAppVersion " 0.17.0"
78#define MyAppPublisher " Microsoft"
Original file line number Diff line number Diff line change 1+ $versionString = " v0.17.0-beta.4"
2+ $version = $versionString.Substring (1 )
3+
4+ Remove-Item ../ bld - Recurse - Force
5+
6+ dotnet publish ../ dev- proxy/ dev- proxy.csproj - c Release - p:PublishSingleFile= true - r win- x64 -- self- contained - o ../ bld - p:InformationalVersion= $version
7+ dotnet build ../ dev- proxy- plugins/ dev- proxy- plugins.csproj - c Release - r win- x64 -- no- self- contained - p:InformationalVersion= $version
8+ cp - R ../ dev- proxy/ bin/ Release/ net8.0 / win- x64/ plugins ../ bld
9+ pushd
10+
11+ cd ../ bld
12+ Get-ChildItem - Filter * .pdb - Recurse | Remove-Item
13+ Get-ChildItem - Filter * .deps.json - Recurse | Remove-Item
14+ Get-ChildItem - Filter * .runtimeconfig.json - Recurse | Remove-Item
15+ popd
Original file line number Diff line number Diff line change 1+ $versionString = " v0.17.0-beta.4"
2+ $version = $versionString.Substring (1 )
3+ $isBeta = $version.Contains (" -beta" )
4+
5+ # Remove old installer if any
6+ Get-Item ../ bld/* installer* - ErrorAction SilentlyContinue | Remove-Item
7+
8+ if (-not (Test-Path ../ bld)) {
9+ Write-Error " Build directory not found. Run local-build.ps1 first."
10+ exit 1
11+ }
12+
13+ if ($isBeta ) {
14+ # Rename executable for beta
15+ Rename-Item - Path ../ bld/ devproxy.exe - NewName devproxy-beta.exe
16+ }
17+
18+ # Add installer icon
19+ Copy-Item ../ media/ icon.ico ../ bld/ icon.ico
20+
21+ # Set installer filename
22+ $installer = $isBeta ? " install-beta.iss" : " install.iss"
23+
24+ # Copy installer file
25+ Copy-Item " ../$installer " " ../bld/$installer "
26+
27+ # Set version in installer script
28+ if ($isBeta ) {
29+ (Get-Content " ../bld/$installer " ) -replace " #define MyAppVersion .*" , " #define MyAppVersion `" $version `" " | Set-Content " ../bld/$installer "
30+ }
31+
32+
33+ ISCC.exe " ../bld/$installer " / F" dev-proxy-installer-win-x64-$versionString "
You can’t perform that action at this time.
0 commit comments