no checkout when no commit hash
This commit is contained in:
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user