Skip to content

Commit

Permalink
only run go mod vendor if git differences
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Feb 25, 2019
1 parent 8d97b50 commit e44725a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .ci/magic-modules/generate-terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ fi

pushd "build/$SHORT_NAME"

GO111MODULE=on go mod vendor
# go mod vendor is a very expensive operation.
# If no changes, avoid running.
if git diff-index --quiet HEAD --; then
GO111MODULE=on go mod vendor
fi

# These config entries will set the "committer".
git config --global user.email "[email protected]"
Expand Down

0 comments on commit e44725a

Please sign in to comment.