[project] archives packers update
This commit is contained in:
@@ -71,10 +71,12 @@ class Haxe extends Sdk {
|
||||
}
|
||||
|
||||
haxe(args) {
|
||||
this.activate();
|
||||
return exec('.', [this.haxeBin].concat(args).join(' '));
|
||||
}
|
||||
|
||||
haxelib(args) {
|
||||
this.activate();
|
||||
return exec('.', [this.haxelibBin].concat(args).join(' '));
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +49,12 @@ class Target {
|
||||
throw 'Not Implemented';
|
||||
}
|
||||
|
||||
resolveTargetPath(platform = this.platform) {
|
||||
return path.resolve(this.target, this.config.name, platform)
|
||||
}
|
||||
|
||||
get targetPath() {
|
||||
return path.resolve(this.target, this.config.name, this.platform);
|
||||
return this.resolveTargetPath();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,11 +236,11 @@ class LinuxArchivePacker extends Packer {
|
||||
|
||||
call() {
|
||||
const target = this.targetPath;
|
||||
const archiveName = `${this.config.meta.filename}_${this.config.meta.version}.tar`;
|
||||
const archiveName = `${this.config.meta.filename}_${this.config.meta.version}_linux.tar`;
|
||||
return gulp.src(`${target}/**/*`)
|
||||
.pipe(tar(archiveName))
|
||||
.pipe(gzip())
|
||||
.pipe(gulp.dest(path.join(target, '..', 'archive')))
|
||||
.pipe(gulp.dest(this.resolveTargetPath('archive')))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,10 +259,10 @@ class WindowsArchivePacker extends Packer {
|
||||
|
||||
call() {
|
||||
const target = this.targetPath;
|
||||
const archiveName = `${this.config.meta.filename}_${this.config.meta.version}.zip`;
|
||||
const archiveName = `${this.config.meta.filename}_${this.config.meta.version}_win.zip`;
|
||||
return gulp.src(`${target}/**/*`)
|
||||
.pipe(zip(archiveName))
|
||||
.pipe(gulp.dest(path.join(target, '..', 'archive')))
|
||||
.pipe(gulp.dest(this.resolveTargetPath('archive')))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user