From 3c9586fdcdc33b9fa2a83e36d9ae799d22cf987c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 18 Apr 2017 14:39:57 -0700 Subject: [PATCH 1/2] double publish windows binaries - refs #756 [publish binary] --- appveyor.yml | 12 ++++++------ common.gypi | 1 + package.json | 2 +- scripts/build-appveyor.bat | 20 +++++++++++++++----- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f570feb59c..94ee5b1a36 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/common.gypi b/common.gypi index dddcee94b1..d53bf02b06 100644 --- a/common.gypi +++ b/common.gypi @@ -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' : [ diff --git a/package.json b/package.json index 6483f21ebd..93e1a76d6b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "url": "http://github.com/mapnik/node-mapnik", "homepage": "http://mapnik.org", "author": "Dane Springmeyer (mapnik.org)", - "version": "3.5.16", + "version": "3.5.16-test", "mapnik_version":"v3.0.13", "main": "./lib/mapnik.js", "binary": { diff --git a/scripts/build-appveyor.bat b/scripts/build-appveyor.bat index 0618102489..80e746803c 100644 --- a/scripts/build-appveyor.bat +++ b/scripts/build-appveyor.bat @@ -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 @@ -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 From 1f19181333c52f1f66eac4946dbaff04812bc596 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 18 Apr 2017 14:50:00 -0700 Subject: [PATCH 2/2] remove testing version [skip ci] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93e1a76d6b..6483f21ebd 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "url": "http://github.com/mapnik/node-mapnik", "homepage": "http://mapnik.org", "author": "Dane Springmeyer (mapnik.org)", - "version": "3.5.16-test", + "version": "3.5.16", "mapnik_version":"v3.0.13", "main": "./lib/mapnik.js", "binary": {