0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-06-29 18:21:10 +00:00

fix(build): Fix make example-init for TF 1.4 (#262)

* fix(build): Fix make example-init for TF 1.4

* add 1.4.2 to versions list
This commit is contained in:
Pavel Boldyrev 2023-03-16 22:09:41 -04:00 committed by GitHub
parent 8b28e94628
commit 914631f58b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 24 deletions

View File

@ -49,9 +49,9 @@ jobs:
matrix: matrix:
# list whatever Terraform versions here you would like to support # list whatever Terraform versions here you would like to support
terraform: terraform:
- '1.1.9'
- '1.2.9' - '1.2.9'
- '1.3.2' - '1.3.8'
- '1.4.2'
steps: steps:
- name: Set up Go - name: Set up Go

View File

@ -3,7 +3,6 @@ NAME=terraform-provider-proxmox
TARGETS=darwin linux windows TARGETS=darwin linux windows
TERRAFORM_PLUGIN_EXTENSION= TERRAFORM_PLUGIN_EXTENSION=
VERSION=0.14.0# x-release-please-version VERSION=0.14.0# x-release-please-version
VERSION_EXAMPLE=9999.0.0
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
TERRAFORM_PLATFORM=windows_amd64 TERRAFORM_PLATFORM=windows_amd64
@ -14,15 +13,19 @@ else
TERRAFORM_PLUGIN_CACHE_DIRECTORY=$(shell pwd -P)/cache/plugins TERRAFORM_PLUGIN_CACHE_DIRECTORY=$(shell pwd -P)/cache/plugins
endif endif
TERRAFORM_PLUGIN_DIRECTORY=$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)/registry.terraform.io/bpg/proxmox/$(VERSION)/$(TERRAFORM_PLATFORM) TERRAFORM_PLUGIN_OUTPUT_DIRECTORY=./build
TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE=$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)/registry.terraform.io/bpg/proxmox/$(VERSION_EXAMPLE)/$(TERRAFORM_PLATFORM) TERRAFORM_PLUGIN_EXECUTABLE=$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)/$(NAME)_v$(VERSION)$(TERRAFORM_PLUGIN_EXTENSION)
TERRAFORM_PLUGIN_EXECUTABLE=$(TERRAFORM_PLUGIN_DIRECTORY)/$(NAME)_v$(VERSION)_x4$(TERRAFORM_PLUGIN_EXTENSION) TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE=$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)/$(NAME)$(TERRAFORM_PLUGIN_EXTENSION)
TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE=$(TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE)/$(NAME)_v$(VERSION_EXAMPLE)_x4$(TERRAFORM_PLUGIN_EXTENSION)
default: build default: build
clean:
rm -rf ./dist
rm -rf ./cache
rm -rf ./build
build: build:
mkdir -p "$(TERRAFORM_PLUGIN_DIRECTORY)" mkdir -p "$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)"
rm -f "$(TERRAFORM_PLUGIN_EXECUTABLE)" rm -f "$(TERRAFORM_PLUGIN_EXECUTABLE)"
go build -o "$(TERRAFORM_PLUGIN_EXECUTABLE)" go build -o "$(TERRAFORM_PLUGIN_EXECUTABLE)"
@ -36,8 +39,8 @@ example-apply:
&& terraform apply -auto-approve && terraform apply -auto-approve
example-build: example-build:
rm -rf "$(TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE)" mkdir -p "$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)"
mkdir -p "$(TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE)" rm -rf "$(TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE)"
go build -o "$(TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE)" go build -o "$(TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE)"
example-destroy: example-destroy:
@ -75,10 +78,10 @@ test:
$(TARGETS): $(TARGETS):
GOOS=$@ GOARCH=amd64 CGO_ENABLED=0 go build \ GOOS=$@ GOARCH=amd64 CGO_ENABLED=0 go build \
-o "dist/$@/$(NAME)_v$(VERSION)-custom_x4" \ -o "dist/$@/$(NAME)_v$(VERSION)-custom" \
-a -ldflags '-extldflags "-static"' -a -ldflags '-extldflags "-static"'
zip \ zip \
-j "dist/$(NAME)_v$(VERSION)-custom_$@_amd64.zip" \ -j "dist/$(NAME)_v$(VERSION)-custom_$@_amd64.zip" \
"dist/$@/$(NAME)_v$(VERSION)-custom_x4" "dist/$@/$(NAME)_v$(VERSION)-custom"
.PHONY: build example example-apply example-destroy example-init example-plan fmt init targets test $(TARGETS) .PHONY: clean build example example-apply example-destroy example-init example-plan fmt init targets test $(TARGETS)

View File

@ -1,9 +1,6 @@
provider_installation { provider_installation {
filesystem_mirror { dev_overrides {
path = "../cache/plugins" "bpg/proxmox" = "../build"
include = ["registry.terraform.io/bpg/proxmox"] }
} direct {}
direct {
exclude = ["registry.terraform.io/bpg/proxmox"]
}
} }

View File

@ -4,13 +4,12 @@ terraform {
source = "hashicorp/local" source = "hashicorp/local"
version = "2.2.2" version = "2.2.2"
} }
proxmox = {
source = "bpg/proxmox"
version = "9999.0.0"
}
tls = { tls = {
source = "hashicorp/tls" source = "hashicorp/tls"
version = "3.1.0" version = "3.1.0"
} }
proxmox = {
source = "bpg/proxmox"
}
} }
} }