fix docker execution

This commit is contained in:
Philipp Kunz 2017-04-02 23:41:51 +02:00
parent 90b9b61a37
commit 566e074cf4
4 changed files with 67 additions and 50 deletions

36
dist/npmci.bash.js vendored
View File

@ -28,23 +28,29 @@ let npmciSmartshell = new plugins.smartshell.Smartshell({
*/ */
let checkToolsAvailable = () => __awaiter(this, void 0, void 0, function* () { let checkToolsAvailable = () => __awaiter(this, void 0, void 0, function* () {
// check for nvm // check for nvm
if ((yield plugins.smartshell.execSilent(`bash -c "source /usr/local/nvm/nvm.sh"`)).exitCode === 0) { if (!process.env.NPMTS_TEST) {
npmciSmartshell.addSourceFiles([`/usr/local/nvm/nvm.sh`]); if ((yield plugins.smartshell.execSilent(`bash -c "source /usr/local/nvm/nvm.sh"`)).exitCode === 0) {
exports.nvmAvailable.resolve(true); npmciSmartshell.addSourceFiles([`/usr/local/nvm/nvm.sh`]);
} exports.nvmAvailable.resolve(true);
else if ((yield plugins.smartshell.execSilent(`bash -c "source ~/.nvm/nvm.sh"`)).exitCode === 0) { }
npmciSmartshell.addSourceFiles([`~/.nvm/nvm.sh`]); else if ((yield plugins.smartshell.execSilent(`bash -c "source ~/.nvm/nvm.sh"`)).exitCode === 0) {
exports.nvmAvailable.resolve(true); npmciSmartshell.addSourceFiles([`~/.nvm/nvm.sh`]);
exports.nvmAvailable.resolve(true);
}
else {
exports.nvmAvailable.resolve(false);
}
;
// check for yarn
yield plugins.smartshell.which('yarn').then(() => {
plugins.smartshell.exec(`yarn config set cache-folder ${plugins.path.join(paths.cwd, '.yarn')}`);
exports.yarnAvailable.resolve(true);
}, () => { exports.yarnAvailable.resolve(false); });
} }
else { else {
exports.nvmAvailable.resolve(false); exports.nvmAvailable.resolve(true);
}
;
// check for yarn
yield plugins.smartshell.which('yarn').then(() => {
plugins.smartshell.exec(`yarn config set cache-folder ${plugins.path.join(paths.cwd, '.yarn')}`);
exports.yarnAvailable.resolve(true); exports.yarnAvailable.resolve(true);
}, () => { exports.yarnAvailable.resolve(false); }); }
}); });
checkToolsAvailable(); checkToolsAvailable();
/** /**
@ -107,4 +113,4 @@ exports.bashBare = (commandArg, retryArg = 2) => __awaiter(this, void 0, void 0,
exports.bashNoError = (commandArg) => __awaiter(this, void 0, void 0, function* () { exports.bashNoError = (commandArg) => __awaiter(this, void 0, void 0, function* () {
return yield exports.bash(commandArg, -1); return yield exports.bash(commandArg, -1);
}); });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuYmFzaC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLmJhc2gudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDJDQUEwQztBQUMxQyx1Q0FBc0M7QUFFdEMsaUNBQWdDO0FBRWhDOztHQUVHO0FBQ1EsUUFBQSxZQUFZLEdBQUcsTUFBTSxDQUFDLEtBQUssRUFBVyxDQUFBO0FBQ3RDLFFBQUEsYUFBYSxHQUFHLE1BQU0sQ0FBQyxLQUFLLEVBQVcsQ0FBQTtBQUNsRDs7R0FFRztBQUNILElBQUksZUFBZSxHQUFHLElBQUksT0FBTyxDQUFDLFVBQVUsQ0FBQyxVQUFVLENBQUM7SUFDdEQsUUFBUSxFQUFFLE1BQU07SUFDaEIsZUFBZSxFQUFFLEVBQUU7Q0FDcEIsQ0FBQyxDQUFBO0FBRUY7O0dBRUc7QUFDSCxJQUFJLG1CQUFtQixHQUFHO0lBQ3hCLGdCQUFnQjtJQUNoQixFQUFFLENBQUMsQ0FDRCxDQUFDLE1BQU0sT0FBTyxDQUFDLFVBQVUsQ0FBQyxVQUFVLENBQUMsd0NBQXdDLENBQUMsQ0FBQyxDQUFDLFFBQVEsS0FBSyxDQUMvRixDQUFDLENBQUMsQ0FBQztRQUNELGVBQWUsQ0FBQyxjQUFjLENBQUMsQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDLENBQUE7UUFDekQsb0JBQVksQ0FBQ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BQyxTQUFTLENBQUMsR0FBRyxDQUFDLHNCQUFzQixHQUFHLFVBQVUsQ0FBQyxDQUFBO1FBQzFELE1BQU0sT0FBTyxDQUFDLFVBQVUsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLENBQUE7UUFDdEMsVUFBVSxHQUFHO1lBQ1gsUUFBUSxFQUFFLENBQUM7WUFDWCxNQUFNLEVBQUUsWUFBWTtTQUNyQixDQUFBO0lBQ0gsQ0FBQztJQUNELE1BQU0sQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFBO0FBQzFCLENBQUMsQ0FBQSxDQUFBO0FBRUQ7O0dBRUc7QUFDUSxRQUFBLFFBQVEsR0FBRyxDQUFPLFVBQWtCLEVBQUUsV0FBbUIsQ0FBQztJQUNuRSxNQUFNLENBQUMsTUFBTSxZQUFJLENBQUMsVUFBVSxFQUFFLFFBQVEsRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUMvQyxDQUFDLENBQUEsQ0FBQTtBQUVEOztHQUVHO0FBQ1EsUUFBQSxXQUFXLEdBQUcsQ0FBTyxVQUFrQjtJQUNoRCxNQUFNLENBQUMsTUFBTSxZQUFJLENBQUMsVUFBVSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDbkMsQ0FBQyxDQUFBLENBQUEifQ==

View File

@ -74,4 +74,4 @@ tap.test('reset paths', async () => {
process.cwd = () => { process.cwd = () => {
return path.join(__dirname, '../') return path.join(__dirname, '../')
} }
}) }).catch(tap.threw)

View File

@ -21,28 +21,33 @@ let npmciSmartshell = new plugins.smartshell.Smartshell({
*/ */
let checkToolsAvailable = async () => { let checkToolsAvailable = async () => {
// check for nvm // check for nvm
if ( if (!process.env.NPMTS_TEST) {
(await plugins.smartshell.execSilent(`bash -c "source /usr/local/nvm/nvm.sh"`)).exitCode === 0 if (
) { (await plugins.smartshell.execSilent(`bash -c "source /usr/local/nvm/nvm.sh"`)).exitCode === 0
npmciSmartshell.addSourceFiles([`/usr/local/nvm/nvm.sh`]) ) {
nvmAvailable.resolve(true) npmciSmartshell.addSourceFiles([ `/usr/local/nvm/nvm.sh` ])
} else if ( nvmAvailable.resolve(true)
(await plugins.smartshell.execSilent(`bash -c "source ~/.nvm/nvm.sh"`)).exitCode === 0 } else if (
) { (await plugins.smartshell.execSilent(`bash -c "source ~/.nvm/nvm.sh"`)).exitCode === 0
npmciSmartshell.addSourceFiles([`~/.nvm/nvm.sh`]) ) {
nvmAvailable.resolve(true) npmciSmartshell.addSourceFiles([ `~/.nvm/nvm.sh` ])
} else { nvmAvailable.resolve(true)
nvmAvailable.resolve(false) } else {
}; nvmAvailable.resolve(false)
};
// check for yarn // check for yarn
await plugins.smartshell.which('yarn').then( await plugins.smartshell.which('yarn').then(
() => { () => {
plugins.smartshell.exec(`yarn config set cache-folder ${plugins.path.join(paths.cwd,'.yarn')}`) plugins.smartshell.exec(`yarn config set cache-folder ${plugins.path.join(paths.cwd, '.yarn')}`)
yarnAvailable.resolve(true) yarnAvailable.resolve(true)
}, },
() => { yarnAvailable.resolve(false) } () => { yarnAvailable.resolve(false) }
) )
} else {
nvmAvailable.resolve(true)
yarnAvailable.resolve(true)
}
} }
checkToolsAvailable() checkToolsAvailable()

View File

@ -46,8 +46,8 @@
resolved "https://registry.yarnpkg.com/@types/js-base64/-/js-base64-2.1.5.tgz#31b6d36a66a4c59ae3f31b5e16bfd6b832a6eb41" resolved "https://registry.yarnpkg.com/@types/js-base64/-/js-base64-2.1.5.tgz#31b6d36a66a4c59ae3f31b5e16bfd6b832a6eb41"
"@types/lodash@4.x.x", "@types/lodash@^4.14.35", "@types/lodash@^4.14.55": "@types/lodash@4.x.x", "@types/lodash@^4.14.35", "@types/lodash@^4.14.55":
version "4.14.57" version "4.14.61"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.57.tgz#f0095fb15ec1004455613f3ad73766583e62f830" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.61.tgz#0518c10805b1f9d21f98f82b1311ac2a6ec75892"
"@types/loggly@1.x.x": "@types/loggly@1.x.x":
version "1.1.30" version "1.1.30"
@ -62,8 +62,8 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.40.tgz#9811dd800ece544cd84b5b859917bf584a150c4c" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.40.tgz#9811dd800ece544cd84b5b859917bf584a150c4c"
"@types/node@*", "@types/node@^7.0.8": "@types/node@*", "@types/node@^7.0.8":
version "7.0.10" version "7.0.12"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.10.tgz#d860abb18c1b58b552c7c6cd8b2ba7adf6546fa3" resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.12.tgz#ae5f67a19c15f752148004db07cbbb372e69efc9"
"@types/promises-a-plus@*": "@types/promises-a-plus@*":
version "0.0.27" version "0.0.27"
@ -1434,8 +1434,8 @@ ini@^1.3.4:
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
interpret@^1.0.0: interpret@^1.0.0:
version "1.0.1" version "1.0.2"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.2.tgz#f4f623f0bb7122f15f5717c8e254b8161b5c5b2d"
invariant@^2.2.0: invariant@^2.2.0:
version "2.2.2" version "2.2.2"
@ -2087,8 +2087,10 @@ normalize-package-data@^2.3.2:
validate-npm-package-license "^3.0.1" validate-npm-package-license "^3.0.1"
normalize-path@^2.0.1: normalize-path@^2.0.1:
version "2.0.1" version "2.1.1"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
dependencies:
remove-trailing-separator "^1.0.1"
npmextra@^2.0.3: npmextra@^2.0.3:
version "2.0.5" version "2.0.5"
@ -2142,7 +2144,7 @@ oauth-sign@~0.8.1:
version "0.8.2" version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
object-assign@4.1.0, object-assign@^4.0.1, object-assign@^4.1.0: object-assign@4.1.0:
version "4.1.0" version "4.1.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
@ -2150,6 +2152,10 @@ object-assign@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
object-assign@^4.0.1, object-assign@^4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
object-component@0.0.3: object-component@0.0.3:
version "0.0.3" version "0.0.3"
resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291" resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291"
@ -2221,8 +2227,8 @@ ora@^0.3.0:
log-symbols "^1.0.2" log-symbols "^1.0.2"
ora@^1.1.0: ora@^1.1.0:
version "1.1.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-1.1.0.tgz#69aaa4a209630e43b142c5f7ff41820da87e2faf" resolved "https://registry.yarnpkg.com/ora/-/ora-1.2.0.tgz#32fb3183500efe83f5ea89101785f0ee6060fec9"
dependencies: dependencies:
chalk "^1.1.1" chalk "^1.1.1"
cli-cursor "^2.1.0" cli-cursor "^2.1.0"
@ -3285,8 +3291,8 @@ uuid@^3.0.0:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
v8flags@^2.0.2: v8flags@^2.0.2:
version "2.0.11" version "2.0.12"
resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.12.tgz#73235d9f7176f8e8833fb286795445f7938d84e5"
dependencies: dependencies:
user-home "^1.1.1" user-home "^1.1.1"