Skip to content

Commit bb91517

Browse files
committed
Bump to 4.9.1, its publishing time.
1 parent c53ec8c commit bb91517

File tree

6 files changed

+9
-28
lines changed

6 files changed

+9
-28
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Run gitlab pipelines locally as shell executor or docker executor.
66

77
Get rid of all those dev specific shell scripts and make files.
88

9-
[![Lines](https://img.shields.io/badge/Coverage-91.28%25-brightgreen.svg)](https://npmjs.org/package/gitlab-ci-local)
9+
[![Lines](https://img.shields.io/badge/Coverage-90.67%25-brightgreen.svg)](https://npmjs.org/package/gitlab-ci-local)
1010
[![build](https://img.shields.io/github/workflow/status/firecow/gitlab-ci-local/build)](https://npmjs.org/package/gitlab-ci-local)
1111
[![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/firecow/gitlab-ci-local)](https://npmjs.org/package/gitlab-ci-local)
1212
[![dependencies](https://img.shields.io/librariesio/release/npm/gitlab-ci-local)](https://npmjs.org/package/gitlab-ci-local)

coverage/coverage-summary.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{"total": {"lines":{"total":688,"covered":628,"skipped":0,"pct":91.28},"statements":{"total":713,"covered":648,"skipped":0,"pct":90.88},"functions":{"total":118,"covered":106,"skipped":0,"pct":89.83},"branches":{"total":403,"covered":317,"skipped":0,"pct":78.66}}
2-
,"/home/mjn/Workspace/gitlab-ci-local/src/commander.ts": {"lines":{"total":114,"covered":99,"skipped":0,"pct":86.84},"functions":{"total":13,"covered":10,"skipped":0,"pct":76.92},"statements":{"total":122,"covered":104,"skipped":0,"pct":85.25},"branches":{"total":69,"covered":54,"skipped":0,"pct":78.26}}
1+
{"total": {"lines":{"total":675,"covered":612,"skipped":0,"pct":90.67},"statements":{"total":700,"covered":632,"skipped":0,"pct":90.29},"functions":{"total":117,"covered":105,"skipped":0,"pct":89.74},"branches":{"total":395,"covered":309,"skipped":0,"pct":78.23}}
2+
,"/home/mjn/Workspace/gitlab-ci-local/src/commander.ts": {"lines":{"total":114,"covered":99,"skipped":0,"pct":86.84},"functions":{"total":13,"covered":10,"skipped":0,"pct":76.92},"statements":{"total":122,"covered":104,"skipped":0,"pct":85.25},"branches":{"total":69,"covered":51,"skipped":0,"pct":73.91}}
33
,"/home/mjn/Workspace/gitlab-ci-local/src/default-cmd.ts": {"lines":{"total":43,"covered":40,"skipped":0,"pct":93.02},"functions":{"total":4,"covered":3,"skipped":0,"pct":75},"statements":{"total":43,"covered":40,"skipped":0,"pct":93.02},"branches":{"total":16,"covered":13,"skipped":0,"pct":81.25}}
44
,"/home/mjn/Workspace/gitlab-ci-local/src/job-expanders.ts": {"lines":{"total":57,"covered":57,"skipped":0,"pct":100},"functions":{"total":12,"covered":12,"skipped":0,"pct":100},"statements":{"total":57,"covered":57,"skipped":0,"pct":100},"branches":{"total":52,"covered":50,"skipped":0,"pct":96.15}}
5-
,"/home/mjn/Workspace/gitlab-ci-local/src/job.ts": {"lines":{"total":201,"covered":190,"skipped":0,"pct":94.53},"functions":{"total":43,"covered":39,"skipped":0,"pct":90.7},"statements":{"total":209,"covered":196,"skipped":0,"pct":93.78},"branches":{"total":119,"covered":100,"skipped":0,"pct":84.03}}
5+
,"/home/mjn/Workspace/gitlab-ci-local/src/job.ts": {"lines":{"total":188,"covered":174,"skipped":0,"pct":92.55},"functions":{"total":42,"covered":38,"skipped":0,"pct":90.48},"statements":{"total":196,"covered":180,"skipped":0,"pct":91.84},"branches":{"total":111,"covered":95,"skipped":0,"pct":85.59}}
66
,"/home/mjn/Workspace/gitlab-ci-local/src/parser.ts": {"lines":{"total":183,"covered":154,"skipped":0,"pct":84.15},"functions":{"total":19,"covered":17,"skipped":0,"pct":89.47},"statements":{"total":186,"covered":157,"skipped":0,"pct":84.41},"branches":{"total":104,"covered":64,"skipped":0,"pct":61.54}}
77
,"/home/mjn/Workspace/gitlab-ci-local/src/stage.ts": {"lines":{"total":8,"covered":8,"skipped":0,"pct":100},"functions":{"total":9,"covered":9,"skipped":0,"pct":100},"statements":{"total":11,"covered":11,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
88
,"/home/mjn/Workspace/gitlab-ci-local/src/state.ts": {"lines":{"total":22,"covered":22,"skipped":0,"pct":100},"functions":{"total":4,"covered":4,"skipped":0,"pct":100},"statements":{"total":25,"covered":25,"skipped":0,"pct":100},"branches":{"total":8,"covered":5,"skipped":0,"pct":62.5}}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitlab-ci-local",
33
"main": "src/index.js",
44
"bin": "src/index.js",
5-
"version": "4.9.0",
5+
"version": "4.9.1",
66
"scripts": {
77
"prepublishOnly": "npm run check-all && chmod +x src/index.js",
88
"pkg-linux": "pkg src/index.js --public -t linux-x64 -o bin/linux/gitlab-ci-local && chmod +x bin/linux/gitlab-ci-local && gzip -c bin/linux/gitlab-ci-local > bin/linux.gz",

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import * as state from "./state";
99

1010
sourceMapSupport.install();
1111
process.on('unhandledRejection', error => {
12-
// Will print "unhandledRejection err is not defined"
13-
console.log('unhandledRejection', error);
12+
console.error(error);
13+
process.exit(1);
1414
});
1515

1616
(() => {

src/job.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -273,26 +273,7 @@ export class Job {
273273
await fs.ensureFile(scriptPath);
274274
await fs.chmod(scriptPath, '777');
275275
await fs.truncate(scriptPath);
276-
277-
let shebang;
278-
if (this.image) {
279-
const command = `docker history ${this.image} | grep -oE '[^A-Za-z0-9](sh|bash)[^A-Za-z0-9]' | grep -oE "(sh|bash)" | sort | head -n1`;
280-
const res = await Utils.spawn(command, {
281-
shell: true, env: {...this.expandedVariables, ...process.env}, cwd: this.cwd
282-
});
283-
if (`${res}`.length === 0) {
284-
throw new ExitError(`${this.image} docker image doesn't contain /bin/bash or /bin/sh`);
285-
}
286-
shebang = `#!/bin/${res}`;
287-
} else {
288-
const res = await Utils.spawn(`ls -1 /bin/ | grep -E '^bash$|^sh$' | head -n1`, {shell: true});
289-
if (`${res}`.length === 0) {
290-
throw new ExitError(`Host PC doesn't contain /bin/bash or /bin/sh`);
291-
}
292-
shebang = `#!/bin/${res}`;
293-
}
294-
295-
await fs.appendFile(scriptPath, `${shebang}\n`);
276+
await fs.appendFile(scriptPath, `#!/bin/bash\n`);
296277
await fs.appendFile(scriptPath, `set -e\n\n`);
297278

298279
for (const line of scripts) {

0 commit comments

Comments
 (0)