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 in 4e63119c540 (terraform: add the version component to terraform provider paths (#34497), 2018-02-06) but broken in 3e5149a79ad (terraform-providers: fix the google and google-beta providers, 2020-03-24) for terraform-providers.google and terraform-providers.google-beta, and in 20f55a9fc07 (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
|
# Terraform allow checking the provider versions, but this breaks
|
||||||
# if the versions are not provided via file paths.
|
# 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
|
# 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
|
# just build and install into $GOPATH/bin
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
go install -mod=vendor -v -p 16 .
|
go install -mod=vendor -v -p 16 .
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# don't run the tests, they are broken in this setup
|
# don't run the tests, they are broken in this setup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user