no checkout when no commit hash

This commit is contained in:
2025-11-29 22:12:23 -05:00
parent 29671e1c1c
commit 72a3ce7906
3 changed files with 2 additions and 11 deletions

8
pnpm-lock.yaml generated
View File

@@ -18,9 +18,6 @@ importers:
specifier: ^3.0.0 specifier: ^3.0.0
version: 3.0.0 version: 3.0.0
devDependencies: devDependencies:
'@octokit/webhooks-types':
specifier: ^7.6.1
version: 7.6.1
'@types/bun': '@types/bun':
specifier: latest specifier: latest
version: 1.3.3 version: 1.3.3
@@ -30,9 +27,6 @@ packages:
'@borewit/text-codec@0.1.1': '@borewit/text-codec@0.1.1':
resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==} 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': '@sinclair/typebox@0.34.41':
resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==} resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==}
@@ -133,8 +127,6 @@ snapshots:
'@borewit/text-codec@0.1.1': {} '@borewit/text-codec@0.1.1': {}
'@octokit/webhooks-types@7.6.1': {}
'@sinclair/typebox@0.34.41': {} '@sinclair/typebox@0.34.41': {}
'@tokenizer/inflate@0.4.1': '@tokenizer/inflate@0.4.1':

View File

@@ -7,7 +7,7 @@ import { rebuildCaddyfile } from "./caddy";
type DeployInstance = { type DeployInstance = {
host: string; host: string;
commitHash: string; commitHash?: string;
}; };
export const deploy = async ({ host, commitHash }: DeployInstance) => { export const deploy = async ({ host, commitHash }: DeployInstance) => {
@@ -29,7 +29,7 @@ export const deploy = async ({ host, commitHash }: DeployInstance) => {
$.cwd(path.join(serviceDir, "src")); $.cwd(path.join(serviceDir, "src"));
await $`git fetch origin ${branch}`; await $`git fetch origin ${branch}`;
await $`git reset --hard origin/${branch}`; await $`git reset --hard origin/${branch}`;
await $`git checkout ${commitHash}`; commitHash && (await $`git checkout ${commitHash}`);
// Build // Build
await $`make build`; await $`make build`;

View File

@@ -2,5 +2,4 @@ import { deploy } from "../deploy";
await deploy({ await deploy({
host: "deployer2", host: "deployer2",
commitHash: "",
}); });