|
|
@ -59,6 +59,18 @@ module.exports = function (grunt) {
|
|
|
|
'recess:min',
|
|
|
|
'recess:min',
|
|
|
|
'copy'
|
|
|
|
'copy'
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
grunt.registerTask('release-macos', [
|
|
|
|
|
|
|
|
'clean:all',
|
|
|
|
|
|
|
|
'if:darwinBinaryNotExist',
|
|
|
|
|
|
|
|
'html2js',
|
|
|
|
|
|
|
|
'uglify',
|
|
|
|
|
|
|
|
'clean:tmpl',
|
|
|
|
|
|
|
|
'jshint',
|
|
|
|
|
|
|
|
//'karma:unit',
|
|
|
|
|
|
|
|
'concat:index',
|
|
|
|
|
|
|
|
'recess:min',
|
|
|
|
|
|
|
|
'copy'
|
|
|
|
|
|
|
|
]);
|
|
|
|
grunt.registerTask('lint', ['jshint']);
|
|
|
|
grunt.registerTask('lint', ['jshint']);
|
|
|
|
grunt.registerTask('test-watch', ['karma:watch']);
|
|
|
|
grunt.registerTask('test-watch', ['karma:watch']);
|
|
|
|
grunt.registerTask('run', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:run']);
|
|
|
|
grunt.registerTask('run', ['if:unixBinaryNotExist', 'build', 'shell:buildImage', 'shell:run']);
|
|
|
@ -296,6 +308,14 @@ module.exports = function (grunt) {
|
|
|
|
'mv api/portainer-linux-arm dist/portainer'
|
|
|
|
'mv api/portainer-linux-arm dist/portainer'
|
|
|
|
].join(' && ')
|
|
|
|
].join(' && ')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
buildDarwinBinary: {
|
|
|
|
|
|
|
|
command: [
|
|
|
|
|
|
|
|
'docker run --rm -v $(pwd)/api:/src -e BUILD_GOOS="darwin" -e BUILD_GOARCH="amd64" centurylink/golang-builder-cross',
|
|
|
|
|
|
|
|
'shasum api/portainer-darwin-amd64 > portainer-checksum.txt',
|
|
|
|
|
|
|
|
'mkdir -p dist',
|
|
|
|
|
|
|
|
'mv api/portainer-darwin-amd64 dist/portainer'
|
|
|
|
|
|
|
|
].join(' && ')
|
|
|
|
|
|
|
|
},
|
|
|
|
buildWindowsBinary: {
|
|
|
|
buildWindowsBinary: {
|
|
|
|
command: [
|
|
|
|
command: [
|
|
|
|
'docker run --rm -v $(pwd)/api:/src -e BUILD_GOOS="windows" -e BUILD_GOARCH="amd64" centurylink/golang-builder-cross',
|
|
|
|
'docker run --rm -v $(pwd)/api:/src -e BUILD_GOOS="windows" -e BUILD_GOARCH="amd64" centurylink/golang-builder-cross',
|
|
|
@ -349,6 +369,12 @@ module.exports = function (grunt) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
ifFalse: ['shell:buildUnixArmBinary']
|
|
|
|
ifFalse: ['shell:buildUnixArmBinary']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
darwinBinaryNotExist: {
|
|
|
|
|
|
|
|
options: {
|
|
|
|
|
|
|
|
executable: 'dist/portainer'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
ifFalse: ['shell:buildDarwinBinary']
|
|
|
|
|
|
|
|
},
|
|
|
|
windowsBinaryNotExist: {
|
|
|
|
windowsBinaryNotExist: {
|
|
|
|
options: {
|
|
|
|
options: {
|
|
|
|
executable: 'dist/portainer.exe'
|
|
|
|
executable: 'dist/portainer.exe'
|
|
|
|