aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-10-19 19:30:02 -0700
committerRob Mensching <rob@firegiant.com>2021-10-20 10:28:27 -0700
commit4ca1a77e321c48078a0060ac116db4e755dff417 (patch)
tree4d1ab710b078c0525446334ab68677a8bc7e7f77
parent54ebab73cd3254c97ed1bc8e1abeed0b5d239177 (diff)
downloadwix-4ca1a77e321c48078a0060ac116db4e755dff417.tar.gz
wix-4ca1a77e321c48078a0060ac116db4e755dff417.tar.bz2
wix-4ca1a77e321c48078a0060ac116db4e755dff417.zip
Import vsdevcmd environment variables if missing during build
-rw-r--r--.github/workflows/build.yml14
-rw-r--r--src/build_all.cmd16
2 files changed, 21 insertions, 9 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e8246f03..e1ac1bd9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,17 +24,13 @@ jobs:
24 - name: Checkout code 24 - name: Checkout code
25 uses: actions/checkout@v2 25 uses: actions/checkout@v2
26 26
27 - name: Setup dotnet
28 uses: actions/setup-dotnet@v1
29 with:
30 dotnet-version: '5.0.x'
31
32 - name: Add MSBuild to PATH
33 uses: microsoft/setup-msbuild@v1.0.3
34
35 - name: Build wix4 27 - name: Build wix4
36 shell: cmd 28 shell: cmd
37 run: ./build.cmd 29 run: ./src/build_official.cmd
30 env:
31 RuntimeTestsEnabled: ${{ github.ref == 'refs/heads/master' }}
32 SigningUser: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_USER || '' }}
33 SigningSecret: ${{ github.ref == 'refs/heads/master' && secrets.WIX_SIGNING_SECRET || '' }}
38 34
39 - name: Save build 35 - name: Save build
40 uses: actions/upload-artifact@v2 36 uses: actions/upload-artifact@v2
diff --git a/src/build_all.cmd b/src/build_all.cmd
index 7c62be74..8f7e7514 100644
--- a/src/build_all.cmd
+++ b/src/build_all.cmd
@@ -6,6 +6,8 @@
6@if /i "%1"=="release" set _C=Release 6@if /i "%1"=="release" set _C=Release
7@if not "%1"=="" shift & goto parse_args 7@if not "%1"=="" shift & goto parse_args
8 8
9@if "%VCToolsVersion%"=="" call :StartDeveloperCommandPrompt
10
9@echo build %_C% 11@echo build %_C%
10 12
11:: Initialize required files/folders 13:: Initialize required files/folders
@@ -56,5 +58,19 @@ call ext\ext.cmd %_C% || exit /b
56 58
57call test\test.cmd %_C% || exit /b 59call test\test.cmd %_C% || exit /b
58 60
61goto LExit
62
63:StartDeveloperCommandPrompt
64echo Initializing developer command prompt
65for /f "usebackq delims=" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do (
66 if exist "%%i\Common7\Tools\vsdevcmd.bat" (
67 call "%%i\Common7\Tools\vsdevcmd.bat" -no_logo
68 exit /b
69 )
70)
71
72exit /b 2
73
74:LExit
59@popd 75@popd
60@endlocal 76@endlocal