Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to statically compiling plugin #60

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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