Skip to content

Commit

Permalink
CRELBAK-231 changed tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Makukh committed Oct 25, 2023
1 parent 72e378b commit e85abaa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,27 @@ for more information about installing third-party providers.

## Building the provider

Clone repository to: `$GOPATH/src/github.com/labd/terraform-provider-commercetools`
Clone repository to: `$GOPATH/src/github.com/vaimo/terraform-provider-commercetools`

```sh
$ mkdir -p $GOPATH/src/github.com/labd; cd $GOPATH/src/github.com/labd
$ git clone [email protected]:labd/terraform-provider-commercetools
$ mkdir -p $GOPATH/src/github.com/vaimo; cd $GOPATH/src/github.com/vaimo
$ git clone [email protected]:vaimo/terraform-provider-commercetools.git
```

Enter the provider directory and build the provider

```sh
$ cd $GOPATH/src/github.com/labd/terraform-provider-commercetools
$ cd $GOPATH/src/github.com/vaimo/terraform-provider-commercetools
$ task build-local
$ GOOS=linux GOARCH=amd64 task build-local
$ GOARCH=amd64 task build-local
```

A build is created `terraform-provider-commercetools_99.0.0` in the root directory and added to plugin folder available
A build is created `terraform-provider-commercetools_13.1.0` in the root directory and added to plugin folder available
locally:

```sh
~/.terraform.d/plugins/local/labd/commercetools/99.0.0/${OS_ARCH}/terraform-provider-commercetools_v99.0.0
~/.terraform.d/plugins/terraform.vaimo.com/vaimo/commercetools/1.13.0${OS_ARCH}/terraform-provider-commercetools_v13.1.0
```

Use version `99.0.0` in the provider to test your changes locally
Expand Down
8 changes: 4 additions & 4 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ tasks:
build-local:
cmds:
- go build -o terraform-provider-{{ .NAME }}_{{ .VERSION }}
- mkdir -p ~/.terraform.d/plugins/registry.terraform.io/labd/{{ .NAME }}/{{ .VERSION }}/{{ .PLATFORM }}/
- mv terraform-provider-{{ .NAME }}_{{ .VERSION }} ~/.terraform.d/plugins/registry.terraform.io/labd/{{ .NAME }}/{{ .VERSION }}/{{ .PLATFORM }}/terraform-provider-{{ .NAME }}_v{{ .VERSION }}
- cmd: codesign --deep --force -s - ~/.terraform.d/plugins/registry.terraform.io/labd/{{ .NAME }}/{{ .VERSION }}/{{ .PLATFORM }}/terraform-provider-{{ .NAME }}_v{{ .VERSION }}
- mkdir -p ~/.terraform.d/plugins/terraform.vaimo.com/vaimo/{{ .NAME }}/{{ .VERSION }}/{{ .PLATFORM }}/
- mv terraform-provider-{{ .NAME }}_{{ .VERSION }} ~/.terraform.d/plugins/terraform.vaimo.com/vaimo/{{ .NAME }}/{{ .VERSION }}/{{ .PLATFORM }}/terraform-provider-{{ .NAME }}_v{{ .VERSION }}
- cmd: codesign --deep --force -s - ~/.terraform.d/plugins/terraform.vaimo.com/vaimo/{{ .NAME }}/{{ .VERSION }}/{{ .PLATFORM }}/terraform-provider-{{ .NAME }}_v{{ .VERSION }}
platforms: [darwin]
vars:
VERSION: 99.0.0
VERSION: 1.13.0
NAME: commercetools
PLATFORM:
sh: echo "$(go env GOOS)_$(go env GOARCH)"
Expand Down

0 comments on commit e85abaa

Please sign in to comment.