mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
#41 빌드 zip 파일 추가.
This commit is contained in:
parent
b08a4d053e
commit
8f60ac8d39
1 changed files with 28 additions and 11 deletions
27
Gruntfile.js
27
Gruntfile.js
|
|
@ -33,6 +33,7 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
grunt.registerTask('build', '', function(A, B) {
|
grunt.registerTask('build', '', function(A, B) {
|
||||||
var _only_export = false;
|
var _only_export = false;
|
||||||
|
var tasks = ['krzip', 'syndication'];
|
||||||
|
|
||||||
if(!A) {
|
if(!A) {
|
||||||
grunt.fail.warn('Undefined build target.');
|
grunt.fail.warn('Undefined build target.');
|
||||||
|
|
@ -54,7 +55,6 @@ module.exports = function(grunt) {
|
||||||
var archive_full = build_dir + '/xe.' + version + '.tar.gz';
|
var archive_full = build_dir + '/xe.' + version + '.tar.gz';
|
||||||
var archive_changed = build_dir + '/xe.' + version + '.changed.tar.gz';
|
var archive_changed = build_dir + '/xe.' + version + '.changed.tar.gz';
|
||||||
var diff, target, version;
|
var diff, target, version;
|
||||||
var tasks = ['krzip', 'syndication'];
|
|
||||||
|
|
||||||
var taskDone = function() {
|
var taskDone = function() {
|
||||||
tasks.pop();
|
tasks.pop();
|
||||||
|
|
@ -70,11 +70,21 @@ module.exports = function(grunt) {
|
||||||
}, function (error, result, code) {
|
}, function (error, result, code) {
|
||||||
grunt.log.ok('Archived(full) : ' + archive_full);
|
grunt.log.ok('Archived(full) : ' + archive_full);
|
||||||
|
|
||||||
|
grunt.util.spawn({
|
||||||
|
cmd: "zip",
|
||||||
|
args: ['-r', 'xe.'+version+'.zip', 'xe/'],
|
||||||
|
opts: {
|
||||||
|
cwd: 'build'
|
||||||
|
}
|
||||||
|
}, function (error, result, code) {
|
||||||
|
grunt.log.ok('Archived(full) : ' + archive_full);
|
||||||
|
|
||||||
grunt.file.delete('build/xe');
|
grunt.file.delete('build/xe');
|
||||||
grunt.file.delete('build/temp.full.tar');
|
grunt.file.delete('build/temp.full.tar');
|
||||||
|
|
||||||
grunt.log.ok('Done!');
|
grunt.log.ok('Done!');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -105,15 +115,23 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
// changed
|
// changed
|
||||||
if(diff.length) {
|
if(diff.length) {
|
||||||
var args = ['archive', '--prefix=xe/', '-o', 'build/xe.'+version+'.changed.tar.gz', version];
|
var args_tar = ['archive', '--prefix=xe/', '-o', 'build/xe.'+version+'.changed.tar.gz', version]
|
||||||
args = args.concat(diff);
|
var args_zip = ['archive', '--prefix=xe/', '-o', 'build/xe.'+version+'.changed.zip', version]
|
||||||
|
args_tar = args_tar.concat(diff);
|
||||||
|
args_zip = args_zip.concat(diff);
|
||||||
|
|
||||||
grunt.util.spawn({
|
grunt.util.spawn({
|
||||||
cmd: "git",
|
cmd: "git",
|
||||||
args: args
|
args: args_tar
|
||||||
|
}, function (error, result, code) {
|
||||||
|
grunt.util.spawn({
|
||||||
|
cmd: "git",
|
||||||
|
args: args_zip
|
||||||
}, function (error, result, code) {
|
}, function (error, result, code) {
|
||||||
grunt.log.ok('Archived(changed) : ./build/xe.'+version+'.changed.tar.gz');
|
grunt.log.ok('Archived(changed) : ./build/xe.'+version+'.changed.tar.gz');
|
||||||
taskDone();
|
taskDone();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
taskDone();
|
taskDone();
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +143,6 @@ module.exports = function(grunt) {
|
||||||
cmd: "tar",
|
cmd: "tar",
|
||||||
args: ['xf', 'build/temp.full.tar', '-C', 'build/xe']
|
args: ['xf', 'build/temp.full.tar', '-C', 'build/xe']
|
||||||
}, function (error, result, code) {
|
}, function (error, result, code) {
|
||||||
|
|
||||||
// krzip
|
// krzip
|
||||||
grunt.util.spawn({
|
grunt.util.spawn({
|
||||||
cmd: "git",
|
cmd: "git",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue