Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
import chalk from "chalk";
import {readFileSync} from "fs";
import yargs from "yargs";
import {Parser} from "./parser.js";
import * as state from "./state.js";
Expand All @@ -10,10 +11,11 @@ import {Argv} from "./argv.js";
import {AssertionError} from "assert";
import {Job, cleanupJobResources} from "./job.js";
import {GitlabRunnerPresetValues} from "./gitlab-preset.js";
import packageJson from "../package.json" with { type: "json" };

const jobs: Job[] = [];

const version = JSON.parse(readFileSync("package.json", "utf8"))["version"];

process.on("SIGINT", async (_: string, code: number) => {
await cleanupJobResources(jobs);
process.exit(code);
Expand All @@ -26,7 +28,7 @@ process.on("SIGUSR2", async () => await cleanupJobResources(jobs));
const yparser = yargs(process.argv.slice(2));
yparser.parserConfiguration({"greedy-arrays": false})
.showHelpOnFail(false)
.version(packageJson["version"])
.version(version)
.wrap(yparser.terminalWidth?.())
.command({
handler: async (argv) => {
Expand Down
5 changes: 2 additions & 3 deletions src/schema/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import _schema from "./schema.json" with { type: "json" };

const schema: any = _schema;
import {readFileSync} from "fs";
const schema: any = JSON.parse(readFileSync("src/schema/schema.json", "utf8"));
schema.definitions.job_template.properties.gclInjectSSHAgent = {
"type": "boolean",
};
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
"inlineSources": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
}
}