From 62ee8a26a438489e6986490d9f6edd85dca7afaf Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sun, 5 Jun 2016 08:00:46 +0200 Subject: [PATCH] fix --- .gitlab-ci.yml | 23 ----------------------- dist/npmci.build.docker.js | 4 ++-- ts/npmci.build.docker.ts | 2 +- 3 files changed, 3 insertions(+), 26 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0a99487..854bcdd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,35 +1,12 @@ image: hosttoday/ht-docker-node:lts stages: -- test - release - trigger before_script: - npm install -g npmci -testLTS: - stage: test - script: - - npmci test lts - tags: - - docker - -testSTABLE: - stage: test - script: - - npmci test stable - tags: - - docker - -testLEGACY: - stage: test - script: - - npmci test legacy - tags: - - docker - allow_failure: true - release: stage: release script: diff --git a/dist/npmci.build.docker.js b/dist/npmci.build.docker.js index efe4dd7..48aae1c 100644 --- a/dist/npmci.build.docker.js +++ b/dist/npmci.build.docker.js @@ -103,7 +103,7 @@ var dockerFileVersion = function (dockerfileNameArg) { var versionString; var versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/; var regexResultArray = versionRegex.exec(dockerfileNameArg); - if (regexResultArray.length = 2) { + if (regexResultArray.length == 2) { versionString = regexResultArray[1]; } else { @@ -131,4 +131,4 @@ exports.dockerTag = function (repoArg, versionArg) { return tagString; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLmRvY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsSUFBWSxPQUFPLFdBQU0saUJBQ3pCLENBQUMsQ0FEeUM7QUFDMUMsSUFBWSxRQUFRLFdBQU0sYUFBYSxDQUFDLENBQUE7QUFHN0IsYUFBSyxHQUFHO0lBQ2YsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEV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tcbiAgICAgICAgfSk7XG4gICAgICAgIE5wbWNpRW52LmRvY2tlckZpbGVzLnNvcnQoZnVuY3Rpb24oYSxiKXtcbiAgICAgICAgICAgIHBsdWdpbnMuYmVhdXR5bG9nLmxvZyhcInNvcnQgYnVpbGQgb3JkZXIgZm9yIERvY2tlcmltYWdlc1wiKTtcbiAgICAgICAgICAgIGxldCBhSW5kZXggPSBub3RZZXRCdWlsdEltYWdlcy5pbmRleE9mKGEuY2xlYW5UYWcpO1xuICAgICAgICAgICAgaWYoYUluZGV4ICE9IC0xKXtub3RZZXRCdWlsdEltYWdlcy5zcGxpY2UoYUluZGV4LDEpfVxuICAgICAgICAgICAgaWYobm90WWV0QnVpbHRJbWFnZXMuaW5kZXhPZihiLmNsZWFuVGFnKSAhPSAtMSl7XG4gICAgICAgICAgICAgICAgcmVkb1NvcnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmKHJlZG9Tb3J0KXtcbiAgICAgICAgICAgIHNvcnRGdW5jdGlvbigpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZG9uZS5yZXNvbHZlKCk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHNvcnRGdW5jdGlvbigpO1xuICAgIHJldHVybiBkb25lLnByb21pc2U7XG59XG5cbmxldCBidWlsZERvY2tlcmZpbGVzID0gZnVuY3Rpb24oKXtcbiAgICBsZXQgZG9uZSA9IHBsdWdpbnMucS5kZWZlcigpO1xuICAgIE5wbWNpRW52LmRvY2tlckZpbGVzLmZvckVhY2goZnVuY3Rpb24oZG9ja2VyZmlsZUFyZyl7XG4gICAgICAgIGRvY2tlcmZpbGVBcmcuYnVpbGQoKTtcbiAgICB9KVxuICAgIGRvbmUucmVzb2x2ZSgpO1xuICAgIHJldHVybiBkb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uKHJlcG9Bcmc6c3RyaW5nLHZlcnNpb25Bcmc6c3RyaW5nKTpzdHJpbmd7XG4gICAgbGV0IHRhZ1N0cmluZzpzdHJpbmc7XG4gICAgbGV0IHJlZ2lzdHJ5ID0gTnBtY2lFbnYuZG9ja2VyUmVnaXN0cnk7XG4gICAgaWYocHJvY2Vzcy5lbnYuQ0lfQlVJTERfU1RBR0UgPT0gXCJ0ZXN0XCIpe1xuICAgICAgICByZWdpc3RyeSA9IFwicmVnaXN0cnkuZ2l0bGFiLmNvbVwiO1xuICAgIH0gXG4gICAgbGV0IHJlcG8gPSByZXBvQXJnO1xuICAgIGxldCB2ZXJzaW9uID0gdmVyc2lvbkFyZztcbiAgICBpZihwcm9jZXNzLmVudi5DSV9CVUlMRF9TVEFHRSA9PSBcInRlc3RcIiB8fCBwcm9jZXNzLmVudi5DSV9CVUlMRF9TVEFHRSA9PSBcImJ1aWxkXCIpe1xuICAgICAgICB2ZXJzaW9uID0gdmVyc2lvbiArIFwiX3Rlc3RcIjtcbiAgICB9XG4gICAgdGFnU3RyaW5nID0gcmVnaXN0cnkgKyBcIi9cIiArIHJlcG8gKyBcIjpcIiArIHZlcnNpb247XG4gICAgcmV0dXJuIHRhZ1N0cmluZztcbn07XG4iXX0= diff --git a/ts/npmci.build.docker.ts b/ts/npmci.build.docker.ts index 4a4ea27..ed64a44 100644 --- a/ts/npmci.build.docker.ts +++ b/ts/npmci.build.docker.ts @@ -108,7 +108,7 @@ let dockerFileVersion = function(dockerfileNameArg:string):string{ let versionString:string; let versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/; let regexResultArray = versionRegex.exec(dockerfileNameArg); - if(regexResultArray.length = 2){ + if(regexResultArray.length == 2){ versionString = regexResultArray[1]; } else { versionString = "latest";