From 72a3ce7906c5105a42e6b428c5c7b6e98a7ec85e Mon Sep 17 00:00:00 2001 From: Daniel McCrystal Date: Sat, 29 Nov 2025 22:12:23 -0500 Subject: [PATCH] no checkout when no commit hash --- pnpm-lock.yaml | 8 -------- src/deploy.ts | 4 ++-- src/scripts/deploySelf.ts | 1 - 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8508c3a..d62ee81 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,9 +18,6 @@ importers: specifier: ^3.0.0 version: 3.0.0 devDependencies: - '@octokit/webhooks-types': - specifier: ^7.6.1 - version: 7.6.1 '@types/bun': specifier: latest version: 1.3.3 @@ -30,9 +27,6 @@ packages: '@borewit/text-codec@0.1.1': resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==} - '@octokit/webhooks-types@7.6.1': - resolution: {integrity: sha512-S8u2cJzklBC0FgTwWVLaM8tMrDuDMVE4xiTK4EYXM9GntyvrdbSoxqDQa+Fh57CCNApyIpyeqPhhFEmHPfrXgw==} - '@sinclair/typebox@0.34.41': resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==} @@ -133,8 +127,6 @@ snapshots: '@borewit/text-codec@0.1.1': {} - '@octokit/webhooks-types@7.6.1': {} - '@sinclair/typebox@0.34.41': {} '@tokenizer/inflate@0.4.1': diff --git a/src/deploy.ts b/src/deploy.ts index a5be8be..3c76cb0 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -7,7 +7,7 @@ import { rebuildCaddyfile } from "./caddy"; type DeployInstance = { host: string; - commitHash: string; + commitHash?: string; }; export const deploy = async ({ host, commitHash }: DeployInstance) => { @@ -29,7 +29,7 @@ export const deploy = async ({ host, commitHash }: DeployInstance) => { $.cwd(path.join(serviceDir, "src")); await $`git fetch origin ${branch}`; await $`git reset --hard origin/${branch}`; - await $`git checkout ${commitHash}`; + commitHash && (await $`git checkout ${commitHash}`); // Build await $`make build`; diff --git a/src/scripts/deploySelf.ts b/src/scripts/deploySelf.ts index 30222b0..9563292 100644 --- a/src/scripts/deploySelf.ts +++ b/src/scripts/deploySelf.ts @@ -2,5 +2,4 @@ import { deploy } from "../deploy"; await deploy({ host: "deployer2", - commitHash: "", });