@@ -45,10 +45,16 @@ call snyk config set api=%SNYK_API_TOKEN%
4545sed -i -e " s/\" buildNumber\" [[:space:]]*\:[[:space:]]*\" .*\" /\" buildNumber\" : \" %PARENT_BUILD_VERSION% \" /g" package.json
4646sed -i -e " s/\" version\" [[:space:]]*\:[[:space:]]\" \(.*\)\" /\" version\" : \" \1-%PARENT_BUILD_VERSION% \" /g" package.json
4747
48- echo " Installing dependencies..."
48+ echo ==========================================================================
49+ echo === Installing dependencies
50+ echo ==========================================================================
51+
4952call npm install
5053
51- echo " Sign screen-share indicator..."
54+ echo ==========================================================================
55+ echo === Signing screen share indicator and native window handle helper
56+ echo ==========================================================================
57+
5258echo %SS_FOLDER%
5359call smctl sign --fingerprint %DIGICERT_FINGERPRINT% --input %SCREENSHARE_INDICATOR_PATH% --tool signtool --verbose
5460smctl sign verify --input node_modules\screen-share-indicator-frame\ScreenShareIndicatorFrame.exe
@@ -69,10 +75,21 @@ IF %errorlevel% neq 0 (
6975 exit /b -1
7076)
7177
72- # Run Snyk Security Tests
73- echo " Running snyk security tests"
74- call snyk test --file=package-lock.json --org=%SNYK_ORG%
75- call snyk monitor --file=package-lock.json --org=%SNYK_ORG% --project-name=%SNYK_PROJECT_NAME%
78+ :: ================================
79+ :: Snyk test & monitor
80+ :: ================================
81+ echo ==========================================================================
82+ echo === Running Snyk Security Tests
83+ echo ==========================================================================
84+
85+ echo Current branch: %BRANCH_NAME%
86+ call snyk test --file=package-lock.json --org=%SNYK_ORG% --project-name=%SNYK_PROJECT_NAME% --target-reference=" %BRANCH_NAME% "
87+ call snyk monitor --file=package-lock.json --org=%SNYK_ORG% --project-name%SNYK_PROJECT_NAME% --target-reference=" %BRANCH_NAME% "
88+
89+ IF %ERRORLEVEL% NEQ 0 (
90+ echo Snyk detected vulnerabilities! Failing the build...
91+ exit /b %ERRORLEVEL%
92+ )
7693
7794:: Set expiry if required
7895IF " %EXPIRY_PERIOD% " == " " (
@@ -82,10 +99,16 @@ IF "%EXPIRY_PERIOD%"=="" (
8299 call gulp setExpiry --period %EXPIRY_PERIOD%
83100)
84101
85- echo " Running tests, code coverage, linting and building..."
102+ echo ==========================================================================
103+ echo === Running tests, code coverage, linting and building
104+ echo ==========================================================================
105+
86106call npm run unpacked-win
87107
88- echo " creating 64 bit msi..."
108+ echo ==========================================================================
109+ echo === Creating 64 bit msi
110+ echo ==========================================================================
111+
89112
90113call node -e " console.log(require('./package.json').version);" > version.txt
91114set /p baseVer = < version.txt
@@ -96,7 +119,11 @@ if NOT DEFINED SYMVER (
96119 exit /b -1
97120)
98121
99- echo " creating targets directory for symphony version: " %SYMVER%
122+ echo ==========================================================================
123+ echo === Creating targets directory for symphony version: %SYMVER%
124+ echo ==========================================================================
125+
126+
100127rmdir /q /s targets
101128mkdir targets
102129set targetsDir = " %CD% \targets\"
@@ -114,7 +141,10 @@ set rootDir="%CD%"
114141
115142cd %installerDir%
116143
117- echo " Signing Symphony.exe file.."
144+ echo ==========================================================================
145+ echo === Signing Symphony.exe files
146+ echo ==========================================================================
147+
118148smctl sign --tool signtool --fingerprint %DIGICERT_FINGERPRINT% --input %SYMPHONY_EXE_PATH% --file-name
119149smctl sign verify --input %SYMPHONY_EXE_PATH%
120150IF %errorlevel% neq 0 (
@@ -134,7 +164,10 @@ IF %errorlevel% neq 0 (
134164
135165node ..\..\scripts\windows_update_checksum.js " ..\..\dist\Symphony-%SYMVER% -win-x64.exe" " ..\..\dist\latest.yml"
136166
137- echo " Building new installer with Wix Sharp"
167+ echo ==========================================================================
168+ echo === Building new installer with Wix Sharp
169+ echo ==========================================================================
170+
138171call " BuildWixSharpInstaller.bat"
139172
140173echo " Signing MSI file.."
@@ -155,10 +188,16 @@ if ERRORLEVEL 1 (
155188 call npm install -g markdown-pdf
156189)
157190
191+
192+ echo ==========================================================================
193+ echo === Generate documentation
194+ echo ==========================================================================
195+
158196echo " Generating installation instructions"
159197call %appdata% \npm\markdown-pdf install_instructions_win.md
160198copy install_instructions_win.pdf " %targetsDir% \Install-Instructions-%archiveName% .pdf"
161199
200+
162201echo Generate release notes
163202cd %rootDir%
164203call %appdata% \npm\markdown-pdf RELEASE_NOTES.md
0 commit comments