diff --git a/CHANGELOG.md b/CHANGELOG.md index 0708b9f7..4988c19e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v0.29.2 (2021-05-19) +==================== +- Fix orderHint not being set but key on category being cleared. Note this will clear orderHint if it's not set. + v0.29.1 (2021-05-19) ==================== - Fix category create not working with only name and slug filled in diff --git a/Makefile b/Makefile index 6360a1b7..65f48d04 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,19 @@ .PHONY: docs +LOCAL_TEST_VERSION = 99.0.0 +OS_ARCH = darwin_amd64 build: go build + +# Build local provider with very high version number for easier local testing and debugging +# see: https://discuss.hashicorp.com/t/easiest-way-to-use-a-local-custom-provider-with-terraform-0-13/12691/5 +build-local: + go build -o terraform-provider-commercetools_${LOCAL_TEST_VERSION} + mkdir -p ~/.terraform.d/plugins/registry.terraform.io/labd/commercetools/${LOCAL_TEST_VERSION}/${OS_ARCH} + cp terraform-provider-commercetools_${LOCAL_TEST_VERSION} ~/.terraform.d/plugins/registry.terraform.io/labd/commercetools/${LOCAL_TEST_VERSION}/${OS_ARCH}/terraform-provider-commercetools_v${LOCAL_TEST_VERSION} + + format: go fmt ./... diff --git a/commercetools/resource_category.go b/commercetools/resource_category.go index 170d9483..6b456366 100644 --- a/commercetools/resource_category.go +++ b/commercetools/resource_category.go @@ -296,7 +296,7 @@ func resourceCategoryUpdate(d *schema.ResourceData, m interface{}) error { newVal := d.Get("order_hint").(string) input.Actions = append( input.Actions, - &commercetools.CategorySetKeyAction{Key: newVal}) + &commercetools.CategoryChangeOrderHintAction{OrderHint: newVal}) } if d.HasChange("description") {