Skip to content

Commit

Permalink
chore: update cibuild make formula to build for any OS (windows, linu…
Browse files Browse the repository at this point in the history
…x, macos)
  • Loading branch information
marinsalinas committed Apr 19, 2019
1 parent 4314396 commit 4c8e5ba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ setenv.sh
request_log
.DS_Store
dist/
pkg/
terraform-provider-nutanix

# Test binary, build with `go test -c`
Expand Down
9 changes: 4 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ test-compile:
# go tool cover -html=c.out

cibuild:
go build
# env GOOS=darwin GOARCH=amd64 go build
# env GOOS=windows GOARCH=amd64 go build
# env GOOS=linux GOARCH=amd64 go build
# env GOOS=linux GOARCH=ppc64 go build
go get github.com/mitchellh/gox
rm -rf pkg/
gox -output "pkg/{{.OS}}_{{.Arch}}/terraform-provider-nutanix"


citest:
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m -coverprofile c.out
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ More Info: https://github.com/golang/dep
3. Clone the repository:

```bash
<<<<<<< HEAD
git clone terraform-providers/terraform-provider-nutanix.git $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
=======
git clone https://github.com/terraform-providers/terraform-provider-nutanix.git $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
>>>>>>> chore: fix bad urls in readme.md file
```

4. Install [golang/dep](https://github.com/golang/dep):
Expand All @@ -215,15 +211,15 @@ More Info: https://github.com/golang/dep

```bash
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
make test
make testacc
make test #unit tests
make testacc #acceptance tests
```

7. Build the binary:

```bash
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix
go build
make cibuild #it will create a pkg folder with the binaries for all OS including linux, windows, macOS
```

## Release it
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ require (
github.com/mitchellh/cli v0.0.0-20180414170447-c48282d14eba // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 // indirect
github.com/mitchellh/gox v1.0.1 // indirect
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,13 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 h1:
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI=
github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4=
github.com/mitchellh/hashstructure v0.0.0-20160209213820-6b17d669fac5/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452 h1:hOY53G+kBFhbYFpRVxHl5eS7laP6B1+Cq+Z9Dry1iMU=
github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20170307201123-53818660ed49/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
Expand Down

0 comments on commit 4c8e5ba

Please sign in to comment.