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
2 changes: 1 addition & 1 deletion .runseal/deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"imports": {
"@perish/harness": "jsr:@perish/harness@0.1.0-beta.2"
"@perish/harness": "jsr:@perish/harness@0.1.0"
},
"compilerOptions": {
"strict": true
Expand Down
8 changes: 4 additions & 4 deletions .runseal/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion .runseal/wrappers/land.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type Options = {
base: string;
body: string;
dry: boolean;
watch: boolean;
};

const budget = 240_000;
Expand Down Expand Up @@ -37,6 +38,10 @@ const sha = await bin("git").text(["rev-parse", "HEAD"]);

const url = await pull(options, branch);
io.print(url);
if (!options.watch) {
io.print("land: PR is up; guard not awaited (--watch=false)");
Deno.exit(0);
}
await guarded(sha);
await bin("gh").run([
"pr",
Expand All @@ -61,6 +66,8 @@ function usage(): void {
io.print("exact pushed head commit are awaited, the PR is squash-merged against");
io.print("that same commit, main is synced, and the topic branch is deleted.");
io.print("");
io.print(" --watch=false stop once the PR exists; skip the guard wait and merge");
io.print("");
io.print("Options:");
io.print(" --base <branch> base branch (default: main)");
io.print(" --body <body> pull request body override");
Expand All @@ -70,13 +77,15 @@ function usage(): void {
function parse(args: string[]): Options & { help: boolean } {
const parsed = cli.parse(args, {
string: ["base", "body"],
boolean: ["dry-run", "help", "h"],
boolean: ["dry-run", "watch", "help", "h"],
default: { watch: true },
});
flags(parsed).positionals("land", { allowHelp: true });
return {
base: flags(parsed).string("base", "main"),
body: flags(parsed).string("body"),
dry: flags(parsed).boolean("dry-run"),
watch: parsed.watch === true,
help: flags(parsed).help(),
};
}
Expand Down
Loading