build: crossplatform build with packages.

Big thanks to @fg2it who created a POC as
well as the build container that this work
is based on.
This commit is contained in:
Leonard Gram
2018-05-08 09:42:20 +02:00
parent 5de2c99c32
commit 9123e0fca8
5 changed files with 99 additions and 32 deletions

View File

@ -3,13 +3,20 @@ var path = require('path');
module.exports = function(grunt) {
"use strict";
// build, then zip and upload to s3
// build then zip
grunt.registerTask('release', [
'build',
'build-post-process',
'compress:release'
]);
// package into archives
grunt.registerTask('package', [
'clean:temp',
'build-post-process',
'compress:release'
]);
grunt.registerTask('build-post-process', function() {
grunt.config('copy.public_to_temp', {
expand: true,
@ -18,7 +25,7 @@ module.exports = function(grunt) {
dest: '<%= tempDir %>/public/',
});
grunt.config('copy.backend_bin', {
cwd: 'bin',
cwd: 'bin/<%= platform %>-<%= arch %>',
expand: true,
src: ['*'],
options: { mode: true},