This commit is contained in:
Philipp Kunz 2016-06-01 05:44:48 +02:00
parent 3fe173e59c
commit 501ff7beb7
8 changed files with 80 additions and 20 deletions

6
dist/index.js vendored
View File

@ -27,11 +27,13 @@ switch (command) {
case "test":
npmci_test_1.test(commandOption);
break;
case "prepare":
break;
case "publish":
npmci_publish_1.publish();
npmci_publish_1.publish(commandOption);
break;
default:
break;
}
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLElBQVksT0FBTyxXQUFNLGlCQUFpQixDQUFDLENBQUE7QUFFM0MsSUFBSSxRQUFRLEdBQUcsT0FBTyxDQUFDLGlCQUFpQixDQUFDLENBQUM7QUFFMUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsaUJBQWlCLEdBQUcsUUFBUSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBRTdELDhCQUFzQixpQkFBaUIsQ0FBQyxDQUFBO0FBQ3hDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUNsQyw4QkFBc0IsaUJBQWlCLENBQUMsQ0FBQTtBQUd4QyxJQUFJLE9BQU8sQ0FBQztBQUNaLElBQUksYUFBYSxDQUFDO0FBRWxCLE9BQU8sQ0FBQyxTQUFTO0tBQ1osU0FBUyxDQUFDLGlDQUFpQyxDQUFDO0tBQzVDLE1BQU0sQ0FBQyxVQUFVLFVBQVUsRUFBRSxnQkFBZ0I7SUFDMUMsT0FBTyxHQUFHLFVBQVUsQ0FBQztJQUNyQixhQUFhLEdBQUcsZ0JBQWdCLENBQUM7QUFDckMsQ0FBQyxDQUFDLENBQUM7QUFFUCxPQUFPLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFFdEMsRUFBR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gIH0pO1xyXG4gXHJcbnBsdWdpbnMuY29tbWFuZGVyLnBhcnNlKHByb2Nlc3MuYXJndik7XHJcbiBcclxuaWYgKHR5cGVvZiBjb21tYW5kID09PSAndW5kZWZpbmVkJykge1xyXG4gICAgY29uc29sZS5lcnJvcignbm8gY29tbWFuZCBnaXZlbiEnKTtcclxuICAgIHByb2Nlc3MuZXhpdCgxKTtcclxufVxyXG5cclxuc3dpdGNoIChjb21tYW5kKXtcclxuICAgIGNhc2UgXCJpbnN0YWxsXCI6XHJcbiAgICAgICAgaW5zdGFsbChjb21tYW5kT3B0aW9uKTtcclxuICAgICAgICBicmVhaztcclxuICAgIGNhc2UgXCJ0ZXN0XCI6XHJcbiAgICAgICAgdGVzdChjb21tYW5kT3B0aW9uKTtcclxuICAgICAgICBicmVhaztcclxuICAgIGNhc2UgXCJwcmVwYXJlXCI6XHJcbiAgICAgICAgXHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICBjYXNlIFwicHVibGlzaFwiOlxyXG4gICAgICAgIHB1Ymxpc2goY29tbWFuZE9wdGlvbik7XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICBkZWZhdWx0OlxyXG4gICAgICAgIGJyZWFrO1xyXG59XHJcblxyXG4iXX0=

View File

@ -4,15 +4,18 @@ var plugins = require("./npmci.plugins");
var npmci_bash_1 = require("./npmci.bash");
exports.install = function (versionArg) {
var done = plugins.q.defer();
plugins.beautylog.log("now installing " + "node ".green + ("version " + versionArg).yellow);
var version;
if (versionArg == "lts") {
version = "4";
}
else if (versionArg = "legacy") {
version = "4.0.0";
}
else {
version = versionArg;
}
;
plugins.beautylog.log("now installing " + "node ".green + ("version " + version).yellow);
npmci_bash_1.bash("nvm install " + version +
" && nvm alias default " + version);
plugins.beautylog.success("Node version " + version + " successfully installed!");
@ -22,4 +25,4 @@ exports.install = function (versionArg) {
return done.promise;
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm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Npb25cclxuICAgICk7XHJcbiAgICBwbHVnaW5zLmJlYXV0eWxvZy5zdWNjZXNzKFwiTm9kZSB2ZXJzaW9uIFwiICsgdmVyc2lvbiArIFwiIHN1Y2Nlc3NmdWxseSBpbnN0YWxsZWQhXCIpO1xyXG4gICAgYmFzaChcIm5vZGUgLXZcIik7XHJcbiAgICBiYXNoKFwibnBtIC12XCIpO1xyXG4gICAgZG9uZS5yZXNvbHZlKCk7XHJcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59Il19

View File

@ -3,4 +3,5 @@ export import beautylog = require("beautylog");
export declare let commander: any;
export declare let q: any;
export declare let shelljs: any;
export declare let smartssh: any;
export import smartfile = require("smartfile");

View File

@ -4,6 +4,7 @@ exports.beautylog = require("beautylog");
exports.commander = require("commander");
exports.q = require("q");
exports.shelljs = require("shelljs");
exports.smartssh = require("smartssh");
exports.smartfile = require("smartfile");
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUNWLGlCQUFTLFdBQVcsV0FBVyxDQUFDLENBQUM7QUFDcEMsaUJBQVMsR0FBRyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUM7QUFDakMsU0FBQyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNqQixlQUFPLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDO0FBQzFCLGlCQUFTLFdBQVcsV0FBVyxDQUFDLENBQUMiLCJmaWxlIjoibnBtY2kucGx1Z2lucy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBcInR5cGluZ3MtZ2xvYmFsXCI7XHJcbmV4cG9ydCBpbXBvcnQgYmVhdXR5bG9nID0gcmVxdWlyZShcImJlYXV0eWxvZ1wiKTt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21hcnRzc2ggPSByZXF1aXJlKFwic21hcnRzc2hcIik7XHJcbmV4cG9ydCBpbXBvcnQgc21hcnRmaWxlID0gcmVxdWlyZShcInNtYXJ0ZmlsZVwiKTsiXX0=

2
dist/npmci.prepare.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
import "typings-global";
export declare let prepare: (serviceArg: string) => any;

31
dist/npmci.prepare.js vendored Normal file
View File

@ -0,0 +1,31 @@
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
var docker = function () {
};
var npm = function () {
var done = plugins.q.defer();
var npmrcPrefix = "//registry.npmjs.org/:_authToken=";
var npmToken = process.env.NPMCITOKEN;
var npmrcFileString = npmrcPrefix + npmToken;
if (npmToken) {
plugins.beautylog.info("found access token");
}
else {
plugins.beautylog.error("no access token found! Exiting!");
process.exit(1);
}
plugins.smartfile.memory.toFsSync(npmrcFileString, { fileName: ".npmrc", filePath: "/root" });
done.resolve();
return done.promise;
};
exports.prepare = function (serviceArg) {
switch (serviceArg) {
case "npm":
return npm();
case "docker":
return docker();
}
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnByZXBhcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBRTNDLElBQUksTUFBTSxHQUFHO0FBRWIsQ0FBQyxDQUFBO0FBRUQsSUFBSSxHQUFHLEdBQUc7SUFDTixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBRTdCLElBQUksV0FBVyxHQUFVLG1DQUFtQyxDQUFDO0lBQzdELElBQUksUUFBUSxHQUFVLE9BQU8sQ0FBQyxHQUFHLENBQUMsVUFBVSxDQUFDO0lBQzdDLElBQUksZUFBZSxHQUFHLFdB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cbiAgICB9XHJcbn0iXX0=

View File

@ -1,2 +1,2 @@
import "typings-global";
export declare let publish: () => any;
export declare let publish: (serviceArg?: string) => any;

48
dist/npmci.publish.js vendored
View File

@ -1,23 +1,43 @@
"use strict";
require("typings-global");
var plugins = require("./npmci.plugins");
var npmci_prepare_1 = require("./npmci.prepare");
var npmci_bash_1 = require("./npmci.bash");
var npmrcPrefix = "//registry.npmjs.org/:_authToken=";
var npmToken = process.env.NPMCITOKEN;
var npmrcFileString = npmrcPrefix + npmToken;
exports.publish = function () {
exports.publish = function (serviceArg) {
if (serviceArg === void 0) { serviceArg = "npm"; }
var done = plugins.q.defer();
if (npmToken) {
plugins.beautylog.info("found access token");
switch (serviceArg) {
case "npm":
publishNpm()
.then(function () {
done.resolve();
});
break;
case "docker":
publishDocker()
.then(function () {
done.resolve();
});
}
else {
plugins.beautylog.error("no access token found! Exiting!");
process.exit(1);
}
plugins.smartfile.memory.toFsSync(npmrcFileString, { fileName: ".npmrc", filePath: "/root" });
npmci_bash_1.bash("npm publish");
plugins.beautylog.ok("Done!");
return done.promise;
};
var publishNpm = function () {
var done = plugins.q.defer();
npmci_prepare_1.prepare("npm")
.then(function () {
npmci_bash_1.bash("npm publish");
plugins.beautylog.ok("Done!");
done.resolve();
});
return done.promise;
};
var publishDocker = function () {
var done = plugins.q.defer();
npmci_prepare_1.prepare("docker")
.then(function () {
npmci_bash_1.bash("docker push");
});
return done.promise;
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUVsQyxJQUFJLFdBQVcsR0FBVSxtQ0FBbUMsQ0FBQzt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aW9uKCl7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9uZS5yZXNvbHZlKCk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgIH1cclxuICAgIHJldHVybiBkb25lLnByb21pc2U7XHJcbn07XHJcblxyXG5sZXQgcHVibGlzaE5wbSAgPSBmdW5jdGlvbigpe1xyXG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcclxuICAgIHByZXBhcmUoXCJucG1cIilcclxuICAgICAgICAudGhlbihmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICBiYXNoKFwibnBtIHB1Ymxpc2hcIik7XHJcbiAgICAgICAgICAgIHBsdWdpbnMuYmVhdXR5bG9nLm9rKFwiRG9uZSFcIikgO1xyXG4gICAgICAgICAgICBkb25lLnJlc29sdmUoKTtcclxuICAgICAgICB9KTtcclxuICAgcmV0dXJuIGRvbmUucHJvbWlzZTtcclxufVxyXG5cclxubGV0IHB1Ymxpc2hEb2NrZXIgPSBmdW5jdGlvbigpe1xyXG4gICAgbGV0IGRvbmUgPSBwbHVnaW5zLnEuZGVmZXIoKTtcclxuICAgIHByZXBhcmUoXCJkb2NrZXJcIilcclxuICAgICAgICAudGhlbihmdW5jdGlvbigpe1xyXG4gICAgICAgICAgICBiYXNoKFwiZG9ja2VyIHB1c2hcIik7XHJcbiAgICAgICAgfSk7XHJcbiAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xyXG59OyJdfQ==