terraform-providers: add version to patchGoModVendor providers (#97590)
Add version to binaries produced via patchGoModVendor to allow run-time provider version validation by terraform. This was initially introduced in4e63119c54
(terraform: add the version component to terraform provider paths (#34497), 2018-02-06) but broken in3e5149a79a
(terraform-providers: fix the google and google-beta providers, 2020-03-24) for terraform-providers.google and terraform-providers.google-beta, and in20f55a9fc0
(terraform-providers.ibm: move to update-all script, 2020-04-26) for terraform-providers.ibm.
This commit is contained in:
parent
4e75022bcf
commit
94d2aeb559
@ -17,7 +17,7 @@ let
|
||||
};
|
||||
# Terraform allow checking the provider versions, but this breaks
|
||||
# if the versions are not provided via file paths.
|
||||
postBuild = "mv go/bin/${repo}{,_v${version}}";
|
||||
postBuild = "mv $NIX_BUILD_TOP/go/bin/${repo}{,_v${version}}";
|
||||
};
|
||||
|
||||
# Google is now using the vendored go modules, which works a bit differently
|
||||
@ -39,6 +39,8 @@ let
|
||||
# just build and install into $GOPATH/bin
|
||||
buildPhase = ''
|
||||
go install -mod=vendor -v -p 16 .
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# don't run the tests, they are broken in this setup
|
||||
|
Loading…
Reference in New Issue
Block a user