@@ -124,6 +124,7 @@ SET ICU_DATA=%MAPNIK_SDK%\share\icu
124124
125125:: actually install deps + compile node-mapnik
126126ECHO building node-mapnik
127+ :: --msvs_version=2015 is passed along to node-gyp here
127128CALL npm install --build-from-source --msvs_version=2015 %TOOLSET_ARGS% --loglevel=http
128129IF %ERRORLEVEL% NEQ 0 GOTO ERROR
129130
@@ -141,18 +142,27 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
141142powershell scripts\build_against_sdk_03-write-mapnik.settings.ps1
142143IF %ERRORLEVEL% NEQ 0 GOTO ERROR
143144
144- CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
145- IF %ERRORLEVEL% NEQ 0 GOTO ERROR
146-
147145CALL npm test
148146:: uncomment to allow build to work even if tests do not pass
149147IF %ERRORLEVEL% NEQ 0 GOTO ERROR
150148
151149ECHO APPVEYOR_REPO_COMMIT_MESSAGE^ : %APPVEYOR_REPO_COMMIT_MESSAGE%
152150SET CM = %APPVEYOR_REPO_COMMIT_MESSAGE%
153- IF NOT " %CM% " == " %CM:[publish binary] =% " (ECHO publishing... && CALL node_modules\.bin\node-pre-gyp --msvs_version=2015 publish %TOOLSET_ARGS% ) ELSE (ECHO not publishing)
151+
152+ :: publish binaries to v140 path
153+ IF NOT " %CM% " == " %CM:[publish binary] =% " (ECHO publishing v140... && CALL node_modules\.bin\node-pre-gyp package publish --toolset=v140) ELSE (ECHO not publishing)
154+ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
155+ IF NOT " %CM% " == " %CM:[republish binary] =% " (ECHO republishing v140 ... && CALL node_modules\.bin\node-pre-gyp package unpublish publish --toolset=v140) ELSE (ECHO not republishing)
156+ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
157+
158+ :: publish binaries to default path
159+ :: in the future this may change depending on:
160+ :: 1) what visual studio versions we support
161+ :: 2) how visual studio binaries are or are not compatible with each other
162+ :: more details: https://github.com/mapnik/node-mapnik/issues/756
163+ IF NOT " %CM% " == " %CM:[publish binary] =% " (ECHO publishing... && CALL node_modules\.bin\node-pre-gyp package publish) ELSE (ECHO not publishing)
154164IF %ERRORLEVEL% NEQ 0 GOTO ERROR
155- IF NOT " %CM% " == " %CM:[republish binary] =% " (ECHO republishing ... && CALL node_modules\.bin\node-pre-gyp --msvs_version= 2015 unpublish publish %TOOLSET_ARGS% ) ELSE (ECHO not republishing)
165+ IF NOT " %CM% " == " %CM:[republish binary] =% " (ECHO republishing ... && CALL node_modules\.bin\node-pre-gyp package unpublish publish) ELSE (ECHO not republishing)
156166IF %ERRORLEVEL% NEQ 0 GOTO ERROR
157167
158168
0 commit comments