mirror of https://github.com/portainer/portainer
Add Linux ARM support (#299)
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>pull/313/head
parent
17f35ef705
commit
c913d858ee
6
build.sh
6
build.sh
|
@ -19,4 +19,10 @@ mv dist/* /tmp/portainer-build-win/portainer
|
|||
cd /tmp/portainer-build-win
|
||||
tar cvpfz portainer-${VERSION}-windows-amd64.tar.gz portainer
|
||||
|
||||
grunt release-arm
|
||||
rm -rf /tmp/portainer-build-arm && mkdir -pv /tmp/portainer-build-arm/portainer
|
||||
mv dist/* /tmp/portainer-build-arm/portainer
|
||||
cd /tmp/portainer-build-arm
|
||||
tar cvpfz portainer-${VERSION}-linux-arm.tar.gz portainer
|
||||
|
||||
exit 0
|
||||
|
|
26
gruntFile.js
26
gruntFile.js
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue