mirror of
https://github.com/grafana/grafana.git
synced 2025-09-18 08:52:52 +08:00
build: correctly adds enterprise to the filename. (#13831)
This commit is contained in:
@ -9,12 +9,17 @@ module.exports = function (grunt) {
|
|||||||
destDir: 'dist',
|
destDir: 'dist',
|
||||||
tempDir: 'tmp',
|
tempDir: 'tmp',
|
||||||
platform: process.platform.replace('win32', 'windows'),
|
platform: process.platform.replace('win32', 'windows'),
|
||||||
|
enterprise: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (grunt.option('platform')) {
|
if (grunt.option('platform')) {
|
||||||
config.platform = grunt.option('platform');
|
config.platform = grunt.option('platform');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (grunt.option('enterprise')) {
|
||||||
|
config.enterprise = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (grunt.option('arch')) {
|
if (grunt.option('arch')) {
|
||||||
config.arch = grunt.option('arch');
|
config.arch = grunt.option('arch');
|
||||||
} else {
|
} else {
|
||||||
|
4
build.go
4
build.go
@ -403,6 +403,10 @@ func gruntBuildArg(task string) []string {
|
|||||||
if phjsToRelease != "" {
|
if phjsToRelease != "" {
|
||||||
args = append(args, fmt.Sprintf("--phjsToRelease=%v", phjsToRelease))
|
args = append(args, fmt.Sprintf("--phjsToRelease=%v", phjsToRelease))
|
||||||
}
|
}
|
||||||
|
if enterprise {
|
||||||
|
args = append(args, "--enterprise")
|
||||||
|
}
|
||||||
|
|
||||||
args = append(args, fmt.Sprintf("--platform=%v", goos))
|
args = append(args, fmt.Sprintf("--platform=%v", goos))
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
@ -76,7 +76,7 @@ if [ -d '/tmp/phantomjs/windows' ]; then
|
|||||||
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
|
cp /tmp/phantomjs/windows/phantomjs.exe tools/phantomjs/phantomjs.exe
|
||||||
rm tools/phantomjs/phantomjs
|
rm tools/phantomjs/phantomjs
|
||||||
else
|
else
|
||||||
echo 'PhantomJS binaries for darwin missing!'
|
echo 'PhantomJS binaries for Windows missing!'
|
||||||
fi
|
fi
|
||||||
go run build.go -goos windows -pkg-arch amd64 ${OPT} package-only
|
go run build.go -goos windows -pkg-arch amd64 ${OPT} package-only
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ module.exports = function(config) {
|
|||||||
var task = {
|
var task = {
|
||||||
release: {
|
release: {
|
||||||
options: {
|
options: {
|
||||||
archive: '<%= destDir %>/<%= pkg.name %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.tar.gz'
|
archive: '<%= destDir %>/<%= pkg.name %><%= enterprise ? "-enterprise" : "" %>-<%= pkg.version %>.<%= platform %>-<%= arch %>.tar.gz'
|
||||||
},
|
},
|
||||||
files : [
|
files : [
|
||||||
{
|
{
|
||||||
@ -23,7 +23,7 @@ module.exports = function(config) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (config.platform === 'windows') {
|
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;
|
return task;
|
||||||
|
Reference in New Issue
Block a user