Skip to content

Commit

Permalink
fix: orderHint changes not being picked up
Browse files Browse the repository at this point in the history
  • Loading branch information
davidweterings committed May 20, 2021
1 parent 68b687f commit 3d2be95
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 ./...

Expand Down
2 changes: 1 addition & 1 deletion commercetools/resource_category.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 3d2be95

Please sign in to comment.