From ac75edde2c2848bf06d3af5c4ba38136fc29d760 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Tue, 5 Sep 2023 06:55:52 -0500 Subject: [PATCH 1/2] fix: clis don't delete themselves --- src/update.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/update.ts b/src/update.ts index 7e777d74..6b0ee1a7 100644 --- a/src/update.ts +++ b/src/update.ts @@ -358,7 +358,9 @@ export class Updater { if (!await fs.pathExists(root)) return const files = await ls(root) const promises = files.map(async (f: any) => { - if (['bin', 'current', this.config.version].includes(path.basename(f.path))) return + if (['bin', 'current'].includes(path.basename(f.path))) return + // if 1.2.3-shasha7 starts with 1.2.3 + if (path.basename(f.path).startsWith(this.config.version)) return const mtime = f.stat.mtime mtime.setHours(mtime.getHours() + (42 * 24)) if (mtime < new Date()) { From 2561303a052175d94babddf4cd4236131c609392 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Tue, 5 Sep 2023 07:02:55 -0500 Subject: [PATCH 2/2] ci: use squash merges --- .github/workflows/automerge.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index d94afea8..ffb8ba2a 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -9,3 +9,5 @@ jobs: uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main secrets: SVC_CLI_BOT_GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }} + with: + mergeMethod: squash