diff --git a/Makefile b/Makefile index 105aeb0..1c11031 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,11 @@ only_build:: build tfgen:: install_plugins cd provider && go build -o $(WORKING_DIR)/bin/${TFGEN} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/${TFGEN} $(WORKING_DIR)/bin/${TFGEN} schema --out provider/cmd/${PROVIDER} + (cd provider && VERSION=$(VERSION) go generate cmd/${PROVIDER}/main.go) + +update_provider:: + (cd provider && go get -u github.com/rootlyhq/terraform-provider-rootly@latest) + (cd provider && go mod tidy -compat=1.19) provider:: tfgen install_plugins # build the provider binary (cd provider && go build -o $(WORKING_DIR)/bin/${PROVIDER} -ldflags "-X ${PROJECT}/${VERSION_PATH}=${VERSION}" ${PROJECT}/${PROVIDER_PATH}/cmd/${PROVIDER})