investigate $HOME

This commit is contained in:
Philipp Kunz 2016-05-30 05:13:15 +02:00
parent 76f67a449d
commit 09188e5733
3 changed files with 20 additions and 5 deletions

View File

@ -21,6 +21,8 @@ testSTABLE:
release:
stage: release
script:
- npm uninstall -g npmci
- npm install -g npmci
- npmci publish
only:
- tags

13
dist/npmci.publish.js vendored
View File

@ -7,11 +7,18 @@ var npmToken = process.env.NPMCITOKEN;
var npmrcFileString = npmrcPrefix + npmToken;
exports.publish = function () {
var done = plugins.q.defer();
plugins.beautylog.ok("Tests passed, now publishing to npm!");
plugins.smartfile.memory.toFsSync(npmrcFileString, { fileName: "npmrc", filePath: "/etc/" });
if (npmToken) {
plugins.beautylog.info("found access token");
}
else {
plugins.beautylog.error("no access token found! Exiting!");
process.exit(1);
}
npmci_bash_1.bash("echo $HOME");
plugins.smartfile.memory.toFsSync(npmrcFileString, { fileName: "npmrc", filePath: "$HOME" });
npmci_bash_1.bash("npm publish");
plugins.beautylog.ok("Done!");
return done.promise;
};
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5wbWNpLnB1Ymxpc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sZ0JBQWdCLENBQUMsQ0FBQTtBQUN4QixJQUFZLE9BQU8sV0FBTSxpQkFBaUIsQ0FBQyxDQUFBO0FBQzNDLDJCQUFtQixjQUFjLENBQUMsQ0FBQTtBQUVsQyxJQUFJLFdBQVcsR0FBVSxtQ0FBbUMsQ0FBQztBQUM3RCxJQUFJLFFBQVEsR0FBVSxPQUFPLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQztBQUM3QyxJQUFJLGVBQWUsR0FBRyxXQUFXLEdBQUcsUUFBUSxDQUFDO0FBR2xDLGVBQU8sR0FBRztJQUNqQixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLEtBQUssRUFBRSxDQUFDO0lBQzdCLE9BQU8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uYmVhdXR5bG9nLmVycm9yKFwibm8gYWNjZXNzIHRva2VuIGZvdW5kISBFeGl0aW5nIVwiKTtcclxuICAgICAgICBwcm9jZXNzLmV4aXQoMSk7XHJcbiAgICB9XHJcbiAgICBiYXNoKFwiZWNobyAkSE9NRVwiKTtcclxuICAgIHBsdWdpbnMuc21hcnRmaWxlLm1lbW9yeS50b0ZzU3luYyhucG1yY0ZpbGVTdHJpbmcse2ZpbGVOYW1lOlwibnBtcmNcIixmaWxlUGF0aDpcIiRIT01FXCJ9KTtcclxuICAgIGJhc2goXCJucG0gcHVibGlzaFwiKTtcclxuICAgIHBsdWdpbnMuYmVhdXR5bG9nLm9rKFwiRG9uZSFcIilcclxuICAgIHJldHVybiBkb25lLnByb21pc2U7XHJcbn07Il19

View File

@ -9,8 +9,14 @@ let npmrcFileString = npmrcPrefix + npmToken;
export let publish = () => {
let done = plugins.q.defer();
plugins.beautylog.ok("Tests passed, now publishing to npm!");
plugins.smartfile.memory.toFsSync(npmrcFileString,{fileName:"npmrc",filePath:"/etc/"});
if(npmToken){
plugins.beautylog.info("found access token");
} else {
plugins.beautylog.error("no access token found! Exiting!");
process.exit(1);
}
bash("echo $HOME");
plugins.smartfile.memory.toFsSync(npmrcFileString,{fileName:"npmrc",filePath:"$HOME"});
bash("npm publish");
plugins.beautylog.ok("Done!")
return done.promise;