chore(build-system): use system architecture instead of hardcoded amd64 value

pull/1327/head
utzb 7 years ago committed by Anthony Lapenna
parent aa32213f7c
commit 711128284e

@ -1,6 +1,9 @@
var autoprefixer = require('autoprefixer'); var autoprefixer = require('autoprefixer');
var cssnano = require('cssnano'); var cssnano = require('cssnano');
var loadGruntTasks = require('load-grunt-tasks'); var loadGruntTasks = require('load-grunt-tasks');
var os = require('os');
var arch = os.arch();
if ( arch === 'x64' ) arch = 'amd64';
module.exports = function (grunt) { module.exports = function (grunt) {
@ -34,8 +37,8 @@ module.exports = function (grunt) {
grunt.registerTask('build', [ grunt.registerTask('build', [
'config:dev', 'config:dev',
'clean:app', 'clean:app',
'shell:buildBinary:linux:amd64', 'shell:buildBinary:linux:' + arch,
'shell:downloadDockerBinary:linux:amd64', 'shell:downloadDockerBinary:linux:' + arch,
'vendor:regular', 'vendor:regular',
'html2js', 'html2js',
'useminPrepare:dev', 'useminPrepare:dev',
@ -184,7 +187,7 @@ module.exports = function (grunt) {
run: { run: {
command: [ command: [
'docker rm -f portainer', 'docker rm -f portainer',
'docker run -d -p 9000:9000 -v $(pwd)/dist:/app -v /tmp/portainer:/data -v /var/run/docker.sock:/var/run/docker.sock:z --name portainer portainer/base /app/portainer-linux-amd64 --no-analytics -a /app' 'docker run -d -p 9000:9000 -v $(pwd)/dist:/app -v /tmp/portainer:/data -v /var/run/docker.sock:/var/run/docker.sock:z --name portainer portainer/base /app/portainer-linux-' + arch + ' --no-analytics -a /app'
].join(';') ].join(';')
}, },
downloadDockerBinary: { downloadDockerBinary: {

Loading…
Cancel
Save