Skip to content

Commit

Permalink
Add to statically compiling plugin (#60)
Browse files Browse the repository at this point in the history
* Add to statically compiling plugin

* Bump up version

* Update license headers

---------

Co-authored-by: sternik <[email protected]>
  • Loading branch information
sternik and sternik authored Jan 5, 2024
1 parent 16502ed commit f745bcc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ BINARY=terraform-provider-${NAME}
VERSION=v1.0.0
GOOS=darwin
GOARCH=amd64
LDFLAGS ?= -s -w -extldflags "-static"

default: install

.ONESHELL:
build:
$(eval V := $(shell echo ${VERSION} | tr -d 'v'))
GOOS=${GOOS} GOARCH=${GOARCH} go build -o ./bin/${BINARY}_${VERSION}
GOOS=${GOOS} GOARCH=${GOARCH} go build -ldflags '$(LDFLAGS)' -o ./bin/${BINARY}_${VERSION}
echo "mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/$(V)/${GOOS}_${GOARCH}" > ./bin/install.sh
echo "cp ${BINARY}_${VERSION} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/$(V)/${GOOS}_${GOARCH}/${BINARY}" >> ./bin/install.sh
chmod +x ./bin/install.sh
Expand All @@ -25,7 +26,7 @@ install: build

generateDoc:
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

test:
go test -i $(TEST) || exit 1
echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ terraform {
required_providers {
imagefactory = {
source = "nordcloud/imagefactory"
version = "1.8.2"
version = "1.8.3"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Copyright 2021-2023 Nordcloud Oy or its affiliates. All Rights Reserved.
* Copyright 2021-2024 Nordcloud Oy or its affiliates. All Rights Reserved.
*/

terraform {
required_version = ">= 0.14"
required_providers {
imagefactory = {
source = "nordcloud/imagefactory"
version = "1.8.2"
version = "1.8.3"
}
}
}
Expand Down

0 comments on commit f745bcc

Please sign in to comment.