From c8332c72fd7cfc932d3f8e3d3704b3dd87e8b034 Mon Sep 17 00:00:00 2001 From: Sophie Stadler Date: Tue, 26 Mar 2024 17:27:15 -0400 Subject: [PATCH] DEVPROD-5136: Only log commits in current directory for deploy (#11) --- apps/parsley/scripts/deploy/email.sh | 2 +- apps/parsley/scripts/deploy/utils/git/index.ts | 2 +- apps/spruce/scripts/deploy/email.sh | 2 +- apps/spruce/scripts/deploy/utils/git/index.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/parsley/scripts/deploy/email.sh b/apps/parsley/scripts/deploy/email.sh index 4be49771a..481a19496 100755 --- a/apps/parsley/scripts/deploy/email.sh +++ b/apps/parsley/scripts/deploy/email.sh @@ -85,7 +85,7 @@ else fi echo "Getting commits between $BASE_COMMIT and $CURRENT_COMMIT_HASH" # get all commits since the base commit - git log --no-merges "$BASE_COMMIT".."$CURRENT_COMMIT_HASH" --pretty="%h %s" > body.txt + git log --no-merges "$BASE_COMMIT".."$CURRENT_COMMIT_HASH" --pretty="%h %s" -- . > body.txt fi diff --git a/apps/parsley/scripts/deploy/utils/git/index.ts b/apps/parsley/scripts/deploy/utils/git/index.ts index 0c0e7f1b7..a5cd5394b 100644 --- a/apps/parsley/scripts/deploy/utils/git/index.ts +++ b/apps/parsley/scripts/deploy/utils/git/index.ts @@ -7,7 +7,7 @@ import { execSync } from "child_process"; */ const getCommitMessages = (currentlyDeployedCommit: string) => { const commitMessages = execSync( - `git log ${currentlyDeployedCommit}..HEAD --oneline`, + `git log ${currentlyDeployedCommit}..HEAD --oneline -- .`, { encoding: "utf-8" } ).toString(); return commitMessages; diff --git a/apps/spruce/scripts/deploy/email.sh b/apps/spruce/scripts/deploy/email.sh index 4ec227c27..80e3d13a2 100755 --- a/apps/spruce/scripts/deploy/email.sh +++ b/apps/spruce/scripts/deploy/email.sh @@ -85,7 +85,7 @@ else fi echo "Getting commits between $BASE_COMMIT and $CURRENT_COMMIT_HASH" # get all commits since the base commit - git log --no-merges "$BASE_COMMIT".."$CURRENT_COMMIT_HASH" --pretty="%h %s" > body.txt + git log --no-merges "$BASE_COMMIT".."$CURRENT_COMMIT_HASH" --pretty="%h %s" -- . > body.txt fi diff --git a/apps/spruce/scripts/deploy/utils/git/index.ts b/apps/spruce/scripts/deploy/utils/git/index.ts index cb06c796a..d73178f8c 100644 --- a/apps/spruce/scripts/deploy/utils/git/index.ts +++ b/apps/spruce/scripts/deploy/utils/git/index.ts @@ -7,7 +7,7 @@ import { execSync } from "child_process"; */ const getCommitMessages = (currentlyDeployedCommit: string) => { const commitMessages = execSync( - `git log ${currentlyDeployedCommit}..HEAD --oneline`, + `git log ${currentlyDeployedCommit}..HEAD --oneline -- .`, { encoding: "utf-8" } ).toString(); return commitMessages;