-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env node | ||
|
||
// Manually run the deployment: | ||
// | ||
// node manual.mjs \ | ||
// --token VERCEL_TOKEN \ | ||
// --team rerun \ | ||
// --project landing \ | ||
// --commit RELEASE_COMMIT | ||
// | ||
|
||
import { execSync } from "node:child_process"; | ||
import { parseArgs } from "node:util"; | ||
import { fileURLToPath } from "node:url"; | ||
import path from "node:path"; | ||
import { assert } from "./util.mjs"; | ||
|
||
const dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
|
||
/** @type {typeof execSync} */ | ||
const $ = (cmd, opts) => execSync(cmd, { stdio: "inherit", ...opts }); | ||
|
||
const { token, team, project, commit } = parseArgs({ | ||
options: { | ||
token: { type: "string" }, | ||
team: { type: "string" }, | ||
project: { type: "string" }, | ||
commit: { type: "string" }, | ||
}, | ||
strict: true, | ||
allowPositionals: false, | ||
}).values; | ||
assert(token, "missing `--token`"); | ||
assert(team, "missing `--team`"); | ||
assert(project, "missing `--project`"); | ||
assert(commit, "missing `--commit`"); | ||
|
||
$("node index.mjs", { | ||
cwd: dirname, | ||
env: { | ||
...process.env, | ||
INPUT_VERCEL_TOKEN: token, | ||
INPUT_VERCEL_TEAM_NAME: team, | ||
INPUT_VERCEL_PROJECT_NAME: project, | ||
INPUT_RELEASE_COMMIT: commit, | ||
}, | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters