Skip to content

Commit c335992

Browse files
authored
Merge pull request #757 from mapnik/publish-two-windows-binaries
Publish two versions of windows binaries
2 parents 4fa5ab6 + 1f19181 commit c335992

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

appveyor.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@ environment:
88
- nodejs_version: 0.10.40
99
platform: x64
1010
msvs_toolset: 14
11-
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
11+
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
1212
- nodejs_version: 0.10.40
1313
platform: x86
1414
msvs_toolset: 14
15-
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
15+
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
1616
- nodejs_version: 4.4.1
1717
platform: x86
1818
msvs_toolset: 14
19-
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
19+
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
2020
- nodejs_version: 4.4.1
2121
platform: x64
2222
msvs_toolset: 14
23-
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
23+
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
2424
- nodejs_version: 5.9.1
2525
platform: x86
2626
msvs_toolset: 14
27-
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
27+
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
2828
- nodejs_version: 5.9.1
2929
platform: x64
3030
msvs_toolset: 14
31-
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
31+
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
3232

3333
os: Visual Studio 2015
3434

common.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
'target_defaults': {
33
'default_configuration': 'Release',
4+
# the v140 refers to vs2015
45
'msbuild_toolset':'v140',
56
'msvs_disabled_warnings': [ 4068,4244,4005,4506,4345,4804,4805,4661 ],
67
'cflags_cc' : [

scripts/build-appveyor.bat

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ SET ICU_DATA=%MAPNIK_SDK%\share\icu
124124

125125
:: actually install deps + compile node-mapnik
126126
ECHO building node-mapnik
127+
:: --msvs_version=2015 is passed along to node-gyp here
127128
CALL npm install --build-from-source --msvs_version=2015 %TOOLSET_ARGS% --loglevel=http
128129
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
129130

@@ -141,18 +142,27 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
141142
powershell scripts\build_against_sdk_03-write-mapnik.settings.ps1
142143
IF %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-
147145
CALL npm test
148146
:: uncomment to allow build to work even if tests do not pass
149147
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
150148

151149
ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: %APPVEYOR_REPO_COMMIT_MESSAGE%
152150
SET 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)
154164
IF %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)
156166
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
157167

158168

0 commit comments

Comments
 (0)