mirror of
https://github.com/outbackdingo/terraform-provider-ct.git
synced 2026-01-27 10:20:38 +00:00
Improve Makefile for local release testing
* Configure the release target to copy the release binary to the appropriate local location to test it without publishing
This commit is contained in:
12
.github/release.yaml
vendored
Normal file
12
.github/release.yaml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
changelog:
|
||||
categories:
|
||||
- title: Contributions
|
||||
labels:
|
||||
- '*'
|
||||
exclude:
|
||||
labels:
|
||||
- dependencies
|
||||
- no-release-note
|
||||
- title: Dependencies
|
||||
labels:
|
||||
- dependencies
|
||||
11
Makefile
11
Makefile
@@ -1,7 +1,7 @@
|
||||
export CGO_ENABLED:=0
|
||||
|
||||
VERSION=$(shell git describe --tags --match=v* --always --dirty)
|
||||
SEMVER=$(shell git describe --tags --match=v* --always --dirty | cut -c 2-)
|
||||
VERSION=$(shell git describe --tags --match=v* --always)
|
||||
SEMVER=$(shell git describe --tags --match=v* --always | cut -c 2-)
|
||||
|
||||
.PHONY: all
|
||||
all: build test vet fmt
|
||||
@@ -42,10 +42,13 @@ release: \
|
||||
|
||||
_output/plugin-%.zip: NAME=terraform-provider-ct_$(SEMVER)_$(subst -,_,$*)
|
||||
_output/plugin-%.zip: DEST=_output/$(NAME)
|
||||
_output/plugin-%.zip: LOCAL=$(HOME)/.terraform.d/plugins/terraform.localhost/poseidon/ct/$(SEMVER)
|
||||
_output/plugin-%.zip: _output/%/terraform-provider-ct
|
||||
@mkdir -p $(DEST)
|
||||
@cp _output/$*/terraform-provider-ct $(DEST)/terraform-provider-ct_$(VERSION)
|
||||
@zip -j $(DEST).zip $(DEST)/terraform-provider-ct_$(VERSION)
|
||||
@mkdir -p $(LOCAL)/$(subst -,_,$*)
|
||||
@cp _output/$*/terraform-provider-ct $(LOCAL)/$(subst -,_,$*)/terraform-provider-ct_$(VERSION)
|
||||
|
||||
_output/linux-amd64/terraform-provider-ct: GOARGS = GOOS=linux GOARCH=amd64
|
||||
_output/linux-arm64/terraform-provider-ct: GOARGS = GOOS=linux GOARCH=arm64
|
||||
@@ -57,9 +60,9 @@ _output/%/terraform-provider-ct:
|
||||
|
||||
release-sign:
|
||||
cd _output; sha256sum *.zip > terraform-provider-ct_$(SEMVER)_SHA256SUMS
|
||||
gpg2 --detach-sign _output/terraform-provider-ct_$(SEMVER)_SHA256SUMS
|
||||
gpg --default-key 0x8F515AD1602065C8 --detach-sign _output/terraform-provider-ct_$(SEMVER)_SHA256SUMS
|
||||
|
||||
release-verify: NAME=_output/terraform-provider-ct
|
||||
release-verify:
|
||||
gpg2 --verify $(NAME)_$(SEMVER)_SHA256SUMS.sig $(NAME)_$(SEMVER)_SHA256SUMS
|
||||
gpg --verify $(NAME)_$(SEMVER)_SHA256SUMS.sig $(NAME)_$(SEMVER)_SHA256SUMS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user