1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 07:19:41 +02:00

Add Linux ARM support (#299)

Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
This commit is contained in:
Stefan Scherer 2016-10-31 21:07:32 +01:00 committed by Anthony Lapenna
parent 17f35ef705
commit c913d858ee
2 changed files with 32 additions and 0 deletions

View file

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