Skip to content

Commit

Permalink
build: correctly adds enterprise to the filename. (#13831)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlson committed Oct 25, 2018
1 parent d505d83 commit 30cb28d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Gruntfile.js
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions build.go
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/build-all.sh
Expand Up @@ -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

4 changes: 2 additions & 2 deletions scripts/grunt/options/compress.js
Expand Up @@ -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 : [
{
Expand All @@ -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;
Expand Down

0 comments on commit 30cb28d

Please sign in to comment.