Skip to content

Commit

Permalink
Add make command to upgrade DCL, use it to see if it works. (GoogleCl…
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-henderson authored and khajduczenia committed Oct 12, 2021
1 parent b965567 commit 348d6b6
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
11 changes: 11 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,16 @@ serialize:
go run . --path "api" --overrides "overrides" --mode "serialization" > temp.serial;\
mv -f temp.serial serialization.go;\

upgrade-dcl:
cd tpgtools && \
go mod edit -require=github.com/GoogleCloudPlatform/declarative-resource-client-library@latest &&\
go mod tidy;\
MOD_LINE=$$(grep declarative-resource-client-library go.mod);\
SUM_LINE=$$(grep declarative-resource-client-library go.sum);\
cd ../mmv1/third_party/terraform && \
sed -i "/declarative-resource-client-library/c$$(printf '\t')$$MOD_LINE" go.mod.erb; echo -e "$$SUM_LINE" >> go.sum



.PHONY: mmv1 tpgtools

2 changes: 1 addition & 1 deletion mmv1/third_party/terraform/go.mod.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/hashicorp/terraform-provider-google<%= "-" + version unless ve

require (
cloud.google.com/go/bigtable v1.10.1
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210914194833-2626db3d194d
github.com/apparentlymart/go-cidr v1.1.0
github.com/client9/misspell v0.3.4
github.com/davecgh/go-spew v1.1.1
Expand Down
2 changes: 2 additions & 0 deletions mmv1/third_party/terraform/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1577,3 +1577,5 @@ rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210914194833-2626db3d194d h1:AuiElGGawUNhmdSfJ1hzBa3734LMzRJQQWV6QoPthOI=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210914194833-2626db3d194d/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
3 changes: 2 additions & 1 deletion tpgtools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ go 1.16

require (
bitbucket.org/creachadair/stringset v0.0.9
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210914194833-2626db3d194d
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/hashicorp/errwrap v1.0.0
github.com/hashicorp/hcl v1.0.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.4.0
github.com/kylelemons/godebug v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions tpgtools/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9 h1:b4+4SWkgDcBSTpKYvl+SaUDZ/PwEMfnuI1z41qPy+z8=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210901222754-f6c1204eeae9/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210914194833-2626db3d194d h1:AuiElGGawUNhmdSfJ1hzBa3734LMzRJQQWV6QoPthOI=
github.com/GoogleCloudPlatform/declarative-resource-client-library v0.0.0-20210914194833-2626db3d194d/go.mod h1:oEeBHikdF/NrnUy0ornVaY1OT+jGvTqm+LQS0+ZDKzU=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE=
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
Expand Down

0 comments on commit 348d6b6

Please sign in to comment.