From 524695b155d063ae760c7c1efd11b88a89c6f17c Mon Sep 17 00:00:00 2001 From: shmyga Date: Mon, 2 Sep 2019 17:06:13 +0300 Subject: [PATCH] [project] archives packers update --- haxetool/haxe.js | 2 ++ haxetool/project.js | 14 +++++++++----- package.json | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/haxetool/haxe.js b/haxetool/haxe.js index a04b96c..3beea3e 100755 --- a/haxetool/haxe.js +++ b/haxetool/haxe.js @@ -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(' ')); } diff --git a/haxetool/project.js b/haxetool/project.js index 24fa292..00e0c79 100755 --- a/haxetool/project.js +++ b/haxetool/project.js @@ -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'))) } } diff --git a/package.json b/package.json index 112e854..7cfdf56 100755 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "plugin-error": "^1.0.1", "promise-streams": "^2.1.1", "tail": "^1.2.3", - "tar": "^4.4.1", + "tar": "^4.4.10", "through2": "^2.0.3", "tmp-file": "^2.0.1", "unzip-stream": "^0.3.0",