diff --git a/package-lock.json b/package-lock.json index 50d260835..a2d5c9615 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "commander": "^9.1.0", - "gh-rel-easy": "^0.12.0", + "gh-rel-easy": "^0.15.0", "ts-node": "^10.7.0", "typescript": "^4.6.2" }, @@ -1158,9 +1158,9 @@ } }, "node_modules/gh-rel-easy": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/gh-rel-easy/-/gh-rel-easy-0.12.0.tgz", - "integrity": "sha512-JkplKWk41LCwRaC9EtlVdVLfDTHqIwHXQ7Um3jpMRZ7DMe/PW0dz5KjArHKsnh8f5g1Ot8se3Sgp+P1qoHwT3A==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/gh-rel-easy/-/gh-rel-easy-0.15.0.tgz", + "integrity": "sha512-wE0c11uVZkYoJQoo/iL31w8Jhaoi16EoqMEe7kDe151cQDT3x2iycgyGwDfcoeGpj5UgjMAmNb6wy5yBJvhqXA==", "dependencies": { "axios": "^0.26.1", "js-yaml": "^4.1.0", @@ -2894,9 +2894,9 @@ "dev": true }, "gh-rel-easy": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/gh-rel-easy/-/gh-rel-easy-0.12.0.tgz", - "integrity": "sha512-JkplKWk41LCwRaC9EtlVdVLfDTHqIwHXQ7Um3jpMRZ7DMe/PW0dz5KjArHKsnh8f5g1Ot8se3Sgp+P1qoHwT3A==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/gh-rel-easy/-/gh-rel-easy-0.15.0.tgz", + "integrity": "sha512-wE0c11uVZkYoJQoo/iL31w8Jhaoi16EoqMEe7kDe151cQDT3x2iycgyGwDfcoeGpj5UgjMAmNb6wy5yBJvhqXA==", "requires": { "axios": "^0.26.1", "js-yaml": "^4.1.0", diff --git a/package.json b/package.json index 128518f9a..6ad50cb4a 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "commander": "^9.1.0", - "gh-rel-easy": "^0.12.0", + "gh-rel-easy": "^0.15.0", "ts-node": "^10.7.0", "typescript": "^4.6.2" } diff --git a/scripts/release.ts b/scripts/release.ts index cadf0a246..9449fa092 100644 --- a/scripts/release.ts +++ b/scripts/release.ts @@ -1,10 +1,8 @@ -import { GHRelEasy, runCli } from "gh-rel-easy"; +import { GHRelEasy, CLI } from "gh-rel-easy"; import { Command } from "commander"; -// HConf -const hconf = runCli("hconf"); +const hconf = new CLI("hconf"); -// GHRelEasy const gh = new GHRelEasy({ gh: "morpheusgraphql/morpheus-graphql", scope: { @@ -16,23 +14,23 @@ const gh = new GHRelEasy({ app: "morpheus-graphql-app", }, pkg: (p) => `https://hackage.haskell.org/package/${p}`, - version: () => hconf("version"), - next: (b) => hconf("next", b && "-b").then(console.log), - setup: () => hconf("setup").then(console.log), + version: () => hconf.exec("version"), + next: (b) => hconf.void("next", b && "-b"), + setup: () => hconf.void("setup"), }); -// CLI -const cli = new Command(); - -cli.name("release-cli").description("Automated Releases").version("1.0"); +const cli = new Command() + .name("release-cli") + .description("Automated Releases") + .version("1.0"); cli .command("open") .option("-d, --dry", "only changelog and setup", false) .action(({ dry }: { dry: boolean }) => gh.release(dry)); -cli.command("changelog").action(async () => { - await gh.changelog("changelog"); -}); +cli + .command("changelog") + .action(() => gh.changelog("changelog").then(() => undefined)); cli.parse();