Skip to content

Commit

Permalink
Update generate-terraform.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson authored Apr 1, 2019
1 parent 1ef8664 commit 86746ba
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .ci/magic-modules/generate-terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)"
Expand Down

0 comments on commit 86746ba

Please sign in to comment.