From 3ea8265a753d16e624c674aa48958d491c331ebe Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Tue, 7 Jun 2016 06:31:53 +0200 Subject: [PATCH] now stating local build depdendencies in log --- dist/npmci.build.docker.js | 3 ++- ts/npmci.build.docker.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/npmci.build.docker.js b/dist/npmci.build.docker.js index ad58d79..f6d3e61 100644 --- a/dist/npmci.build.docker.js +++ b/dist/npmci.build.docker.js @@ -181,6 +181,7 @@ var Dockerfile = (function () { Dockerfile.prototype.patchContents = function () { var done = plugins.q.defer(); if (this.localBaseImageDependent == true) { + plugins.beautylog.info("Patching Dockerfile due to local build dependency!"); this.patchedContent = this.content.replace(/FROM\s[a-zA-Z0-9\/\-\:]*/, 'FROM ' + this.localBaseDockerfile.buildTag); plugins.smartfile.memory.toFsSync(this.patchedContent, { fileName: plugins.path.parse(this.filePath).name, @@ -247,4 +248,4 @@ exports.cleanTagsArrayFunction = function (dockerfileArrayArg, trackingArrayArg) return cleanTagsArray; }; -//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmJ1aWxkLmRvY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsSUFBWSxPQUFPLFdBQU0saUJBQWlCLENBQUMsQ0FBQTtBQUMzQyxJQUFZLEtBQUssV0FBTSxlQUFlLENBQUMsQ0FBQTtBQUN2QyxJQUFZLFFBQVEsV0FBTSxhQUFhLENBQUMsQ0FBQTtBQUN4QywyQkFBdUIsY0FBYyxDQUFDLENBQUE7QUFFM0IsYUFBSyxHQUFHO0lBQ2YsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQztJQUM3Qix1QkFBZSxFQUFFO1NBQ1osSUFBSSxDQUFDLHVCQUFlLENBQUM7U0FDckIsSUFBSSxDQUFDLHNCQUF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1cm4gdGFnU3RyaW5nO1xufTtcblxuZXhwb3J0IGxldCBjbGVhblRhZ3NBcnJheUZ1bmN0aW9uID0gZnVuY3Rpb24oZG9ja2VyZmlsZUFycmF5QXJnOkRvY2tlcmZpbGVbXSx0cmFja2luZ0FycmF5QXJnOkRvY2tlcmZpbGVbXSk6c3RyaW5nW117XG4gICAgbGV0IGNsZWFuVGFnc0FycmF5OnN0cmluZ1tdID0gW107XG4gICAgZG9ja2VyZmlsZUFycmF5QXJnLmZvckVhY2goZnVuY3Rpb24oZG9ja2VyZmlsZUFyZyl7XG4gICAgICAgIGlmKHRyYWNraW5nQXJyYXlBcmcuaW5kZXhPZihkb2NrZXJmaWxlQXJnKSA9PSAtMSl7XG4gICAgICAgICAgICBjbGVhblRhZ3NBcnJheS5wdXNoKGRvY2tlcmZpbGVBcmcuY2xlYW5UYWcpO1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgcmV0dXJuIGNsZWFuVGFnc0FycmF5O1xufSJdfQ== diff --git a/ts/npmci.build.docker.ts b/ts/npmci.build.docker.ts index 272dc2f..b800497 100644 --- a/ts/npmci.build.docker.ts +++ b/ts/npmci.build.docker.ts @@ -191,6 +191,7 @@ export class Dockerfile { patchContents(){ let done = plugins.q.defer(); if(this.localBaseImageDependent == true){ + plugins.beautylog.info("Patching Dockerfile due to local build dependency!"); this.patchedContent = this.content.replace(/FROM\s[a-zA-Z0-9\/\-\:]*/, 'FROM ' + this.localBaseDockerfile.buildTag); plugins.smartfile.memory.toFsSync( this.patchedContent,