File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -34,18 +34,9 @@ copy_terraform_to_mirror() {
3434check_module_changes () {
3535 binpath=" $1 "
3636 srcpath=" $2 "
37- build_hash=" $( go version -m " ${binpath} " | grep ' vcs.revision' | cut -f2 -d' =' ) "
38- # If it's a locally developed provider
39- if test -n " ${build_hash} " ; then
40- # Check if a provider has changed based on git changes since the
41- # revision the provider was last built
42- git diff --name-only --exit-code " ${build_hash} .." -- " ${srcpath} "
43- # If it's an imported module
44- else
45- # Check if a provider has changed based on its go.mod git hash
46- version_info=" $( go version -m " ${binpath} " | grep -Eo ' main.builtGoModHash=[a-fA-F0-9]+' | cut -f2 -d' =' ) "
47- test " ${version_info} " == " $( git hash-object " ${srcpath} /go.mod" ) "
48- fi
37+ # Check if a provider has changed based on its go.mod git hash
38+ version_info=" $( go version -m " ${binpath} " | grep -Eo ' main.builtGoModHash=[a-fA-F0-9]+' | cut -f2 -d' =' ) "
39+ test " ${version_info} " == " $( git hash-object " ${srcpath} /go.mod" ) "
4940}
5041
5142# Build terraform and providers only if needed
You can’t perform that action at this time.
0 commit comments