Skip to content

Commit 611e16a

Browse files
Merge pull request #7847 from r4f4/rebuild-tf-providers-fix
no-jira: build: drop vsphereprivate build workaround
2 parents ba66fc6 + cdf477d commit 611e16a

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

hack/build.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,9 @@ copy_terraform_to_mirror() {
3434
check_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

0 commit comments

Comments
 (0)