Comparing version 0.12.3 to 0.13.0-alpha4sdk
{ | ||
"name": "nw", | ||
"version": "0.12.3", | ||
"version": "0.13.0-alpha4sdk", | ||
"description": "A installer for nw.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -15,2 +15,3 @@ #!/usr/bin/env node | ||
var buildSDK = false; | ||
var v = semver.parse(require('../package.json').version); | ||
@@ -25,2 +26,6 @@ var version = [v.major, v.minor, v.patch].join('.'); | ||
} | ||
if ( version.slice(-3) === 'sdk' ){ | ||
version = version.slice(0, -3); | ||
buildSDK = true; | ||
} | ||
var url = false; | ||
@@ -32,9 +37,9 @@ var urlBase = process.env.npm_config_nwjs_urlbase || process.env.NWJS_URLBASE || 'http://dl.nwjs.io/v'; | ||
case 'win32': | ||
url = urlBase + version + '/nwjs-v' + version + '-win-' + process.arch +'.zip'; | ||
url = urlBase + version + '/nwjs-' + (buildSDK ? 'sdk-' : '') + 'v' + version + '-win-' + process.arch +'.zip'; | ||
break; | ||
case 'darwin': | ||
url = urlBase + version + '/nwjs-v' + version + '-osx-' + process.arch + '.zip'; | ||
url = urlBase + version + '/nwjs-' + (buildSDK ? 'sdk-' : '') + 'v' + version + '-osx-' + process.arch + '.zip'; | ||
break; | ||
case 'linux': | ||
url = urlBase + version + '/nwjs-v' + version + '-linux-' + process.arch + '.tar.gz'; | ||
url = urlBase + version + '/nwjs-' + (buildSDK ? 'sdk-' : '') + 'v' + version + '-linux-' + process.arch + '.tar.gz'; | ||
break; | ||
@@ -41,0 +46,0 @@ } |
12803
123