npmci/dist/npmci.env.js

31 lines
4.2 KiB
JavaScript
Raw Normal View History

2016-06-02 15:57:01 +00:00
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
var paths = require("./npmci.paths");
var smartstring_1 = require("smartstring");
exports.repo = new smartstring_1.GitRepo(process.env.CI_BUILD_REPO);
exports.buildStage = process.env.CI_BUILD_STAGE;
exports.dockerFilesBuilt = [];
exports.dockerFiles = [];
2016-06-05 21:53:01 +00:00
exports.configStore = function () {
plugins.smartfile.memory.toFsSync(JSON.stringify(exports.config), {
fileName: "config.json",
filePath: paths.NpmciPackageRoot
});
};
exports.configLoad = function () {
2016-06-05 21:53:01 +00:00
try {
exports.config = plugins.smartfile.local.toObjectSync(paths.NpmciPackageConfig, "json");
}
catch (err) {
exports.config = {};
exports.configStore();
plugins.beautylog.log("config inititialized!");
}
exports.config.dockerRegistry ? exports.dockerRegistry = exports.config.dockerRegistry : void (0);
exports.config.dockerFilesBuilt ? exports.dockerFilesBuilt = exports.config.dockerFilesBuilt : void (0);
};
2016-06-05 21:53:01 +00:00
exports.configLoad();
2016-06-02 15:57:01 +00:00
2016-06-07 08:21:56 +00:00
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLmVudi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFDM0MsSUFBWSxLQUFLLFdBQU0sZUFBZSxDQUFDLENBQUE7QUFDdkMsNEJBQXNCLGFBQWEsQ0FBQyxDQUFBO0FBR3pCLFlBQUksR0FBVyxJQUFJLHFCQUFPLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQztBQUV0RCxrQkFBVSxHQUFVLE9BQU8sQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDO0F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