Skip to content

Commit 2450be7

Browse files
toppercodesampagent
andcommitted
Add dedicated local provider install target
Amp-Thread-ID: https://ampcode.com/threads/T-019cb38a-d07d-75bf-9176-bc810a11c485 Co-authored-by: Amp <amp@ampcode.com>
1 parent fe3a90e commit 2450be7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ NAME=axiom
55
BINARY=terraform-provider-${NAME}
66
GIT_TAG:=$(shell git describe --tags --exact-match 2>/dev/null)
77
VERSION?=$(if $(GIT_TAG),$(patsubst v%,%,$(GIT_TAG)),dev)
8+
LOCAL_TEST_VERSION?=0.0.0-local
89
LDFLAGS=-X terraform-provider-axiom-provider/axiom.providerVersion=${VERSION}
910
OS_ARCH=darwin_arm64
1011

@@ -34,6 +35,11 @@ install: build
3435
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
3536
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
3637

38+
install-local:
39+
go build -ldflags "-X terraform-provider-axiom-provider/axiom.providerVersion=${LOCAL_TEST_VERSION}" -o ${BINARY}
40+
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${LOCAL_TEST_VERSION}/${OS_ARCH}
41+
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${LOCAL_TEST_VERSION}/${OS_ARCH}
42+
3743
test:
3844
go test -count=1 -parallel=4 ./...
3945

0 commit comments

Comments
 (0)