From 30cb28df55a918fe220316aebde9ee5481a85ea6 Mon Sep 17 00:00:00 2001 From: Leonard Gram Date: Thu, 25 Oct 2018 16:55:27 +0200 Subject: [PATCH] build: correctly adds enterprise to the filename. (#13831) --- Gruntfile.js | 5 +++++ build.go | 4 ++++ scripts/build/build-all.sh | 2 +- scripts/grunt/options/compress.js | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2d5990b5f58a2..de3e68d4a922f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,12 +9,17 @@ module.exports = function (grunt) { destDir: 'dist', tempDir: 'tmp', platform: process.platform.replace('win32', 'windows'), + enterprise: false, }; if (grunt.option('platform')) { config.platform = grunt.option('platform'); } + if (grunt.option('enterprise')) { + config.enterprise = true; + } + if (grunt.option('arch')) { config.arch = grunt.option('arch'); } else { diff --git a/build.go b/build.go index 69fbf3bada80a..6fd55da25b6aa 100644 --- a/build.go +++ b/build.go @@ -403,6 +403,10 @@ func gruntBuildArg(task string) []string { if phjsToRelease != "" { args = append(args, fmt.Sprintf("--phjsToRelease=%v", phjsToRelease)) } + if enterprise { + args = append(args, "--enterprise") + } + args = append(args, fmt.Sprintf("--platform=%v", goos)) return args diff --git a/scripts/build/build-all.sh b/scripts/build/build-all.sh index 64e51ca625963..f194109ec0d42 100755 --- a/scripts/build/build-all.sh +++ b/scripts/build/build-all.sh @@ -76,7 +76,7 @@ if [ -d '/tmp/phantomjs/windows' ]; then cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe rm tools/phantomjs/phantomjs else - echo 'PhantomJS binaries for darwin missing!' + echo 'PhantomJS binaries for Windows missing!' fi go run build.go -goos windows -pkg-arch amd64 ${OPT} package-only diff --git a/scripts/grunt/options/compress.js b/scripts/grunt/options/compress.js index 4dc77ec82f857..943a42bb571b0 100644 --- a/scripts/grunt/options/compress.js +++ b/scripts/grunt/options/compress.js @@ -4,7 +4,7 @@ module.exports = function(config) { var task = { release: { options: { - archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.tar.gz' + archive: '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.tar.gz' }, files : [ { @@ -23,7 +23,7 @@ module.exports = function(config) { }; if (config.platform === 'windows') { - task.release.options.archive = '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.zip'; + task.release.options.archive = '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.zip'; } return task;