Skip to content

Commit

Permalink
Merge pull request #757 from mapnik/publish-two-windows-binaries
Browse files Browse the repository at this point in the history
Publish two versions of windows binaries
  • Loading branch information
springmeyer authored Apr 18, 2017
2 parents 4fa5ab6 + 1f19181 commit c335992
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
12 changes: 6 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ environment:
- nodejs_version: 0.10.40
platform: x64
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
- nodejs_version: 0.10.40
platform: x86
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
- nodejs_version: 4.4.1
platform: x86
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
- nodejs_version: 4.4.1
platform: x64
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
- nodejs_version: 5.9.1
platform: x86
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11
- nodejs_version: 5.9.1
platform: x64
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11

os: Visual Studio 2015

Expand Down
1 change: 1 addition & 0 deletions common.gypi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
'target_defaults': {
'default_configuration': 'Release',
# the v140 refers to vs2015
'msbuild_toolset':'v140',
'msvs_disabled_warnings': [ 4068,4244,4005,4506,4345,4804,4805,4661 ],
'cflags_cc' : [
Expand Down
20 changes: 15 additions & 5 deletions scripts/build-appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ SET ICU_DATA=%MAPNIK_SDK%\share\icu

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

Expand All @@ -141,18 +142,27 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR
powershell scripts\build_against_sdk_03-write-mapnik.settings.ps1
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm test
:: uncomment to allow build to work even if tests do not pass
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO APPVEYOR_REPO_COMMIT_MESSAGE^: %APPVEYOR_REPO_COMMIT_MESSAGE%
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
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)

:: publish binaries to v140 path
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing v140... && CALL node_modules\.bin\node-pre-gyp package publish --toolset=v140) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
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)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:: publish binaries to default path
:: in the future this may change depending on:
:: 1) what visual studio versions we support
:: 2) how visual studio binaries are or are not compatible with each other
:: more details: https://github.com/mapnik/node-mapnik/issues/756
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing... && CALL node_modules\.bin\node-pre-gyp package publish) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
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)
IF NOT "%CM%" == "%CM:[republish binary]=%" (ECHO republishing ... && CALL node_modules\.bin\node-pre-gyp package unpublish publish) ELSE (ECHO not republishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR


Expand Down

0 comments on commit c335992

Please sign in to comment.