From 6446997a12f21610490d78bc0610cc1441e570fa Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 21 Jun 2026 22:07:47 +1000 Subject: [PATCH 1/3] fix: strip v prefix from version in make install path Terraform plugin directory expects bare version numbers (e.g. 0.0.2) but git tags use v-prefixed versions (e.g. v0.0.2). --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5753bcf..308f327 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ BINARY := terraform-provider-artifactapi VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "0.0.0-dev") OS_ARCH := linux_amd64 -INSTALL_DIR := ~/.terraform.d/plugins/git.unkin.net/unkin/artifactapi/$(VERSION)/$(OS_ARCH) +INSTALL_VERSION := $(shell echo $(VERSION) | sed 's/^v//') +INSTALL_DIR := ~/.terraform.d/plugins/git.unkin.net/unkin/artifactapi/$(INSTALL_VERSION)/$(OS_ARCH) GO_VERSION_REQUIRED := 1.23 GO_VERSION_ACTUAL := $(shell go version | sed 's/go version go\([0-9]*\.[0-9]*\).*/\1/') From d2da94cb521bf193db207e88958c3ef21b62fa73 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 21 Jun 2026 22:16:59 +1000 Subject: [PATCH 2/3] fix: pul_request tests only - update tests to run on pull request only --- .woodpecker/build.yml | 2 +- .woodpecker/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 77b69fc..9c181f7 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -1,5 +1,5 @@ when: - - event: [push, pull_request] + - event: pull_request steps: - name: build diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index 4a56955..bb94e07 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -1,5 +1,5 @@ when: - - event: [push, pull_request] + - event: pull_request steps: - name: lint From 3d776f9e0fbfab2fec30d5a889a61e4751027fce Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sun, 21 Jun 2026 22:27:06 +1000 Subject: [PATCH 3/3] feat: add pre-commit to build jobs ensure pre-commit is run by woodpecker in ci --- .woodpecker/pre-commit.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .woodpecker/pre-commit.yaml diff --git a/.woodpecker/pre-commit.yaml b/.woodpecker/pre-commit.yaml new file mode 100644 index 0000000..d57b508 --- /dev/null +++ b/.woodpecker/pre-commit.yaml @@ -0,0 +1,18 @@ +when: + - event: pull_request + +steps: + - name: pre-commit + image: git.unkin.net/unkin/almalinux9-gobuilder:20260606 + commands: + - uvx pre-commit run --all-files + backend_options: + kubernetes: + serviceAccountName: default + resources: + requests: + memory: 512Mi + cpu: 1 + limits: + memory: 2Gi + cpu: 2