-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ef8664
commit 86746ba
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,18 @@ fi | |
|
||
pushd "build/$SHORT_NAME" | ||
|
||
# Begin building our commit; we need to set the committer details, and add our modified files. | ||
# | ||
# Note that we need to perform `go mod vendor` _after_ adding the files because we're skipping | ||
# the vendor step if Terraform has no changes. Ideally it would happen before, but because we | ||
# deleted all of the existing files earlier in this script we'll see changes until we've staged | ||
# our generated changes. | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "Modular Magician" | ||
|
||
git add -A | ||
|
||
# TODO: Remove this, this is just to see what the Magician does | ||
git status | ||
|
||
|
@@ -67,11 +79,6 @@ if [[ ! -z $(git status -s) ]]; then | |
GO111MODULE=on go mod vendor | ||
fi | ||
|
||
# These config entries will set the "committer". | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Modular Magician" | ||
|
||
git add -A | ||
# Set the "author" to the commit's real author. | ||
git commit -m "$TERRAFORM_COMMIT_MSG" --author="$LAST_COMMIT_AUTHOR" || true # don't crash if no changes | ||
git checkout -B "$(cat ../../branchname)" | ||
|