Skip to content

Commit 314b203

Browse files
authored
fix(scripts): default generate-client-tarball-since to origin/main (#7917)
1 parent ee85613 commit 314b203

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

scripts/generate-client-tarball/generate-client-tarball-since.mjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@ import { fileURLToPath } from "node:url";
1717

1818
const __dirname = dirname(fileURLToPath(import.meta.url));
1919
const rootDir = join(__dirname, "..", "..");
20-
const commitHash = process.argv[2];
20+
const commitHash = process.argv[2] ?? execSync("git rev-parse origin/main", { cwd: rootDir, encoding: "utf-8" }).trim();
2121

22-
if (!commitHash) {
23-
console.error("Usage: yarn generate:client:tarball:since <commit-hash>");
24-
process.exit(1);
25-
}
22+
console.log(`Generating tarball for clients since ${commitHash}`);
2623

2724
function getChangedClients(sinceCommit) {
2825
const diffOutput = execSync(`git log ${sinceCommit}..HEAD --format=%s`, {

0 commit comments

Comments
 (0)