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:
parent
8b28e94628
commit
914631f58b
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -49,9 +49,9 @@ jobs:
|
||||
matrix:
|
||||
# list whatever Terraform versions here you would like to support
|
||||
terraform:
|
||||
- '1.1.9'
|
||||
- '1.2.9'
|
||||
- '1.3.2'
|
||||
- '1.3.8'
|
||||
- '1.4.2'
|
||||
steps:
|
||||
|
||||
- name: Set up Go
|
||||
|
25
Makefile
25
Makefile
@ -3,7 +3,6 @@ NAME=terraform-provider-proxmox
|
||||
TARGETS=darwin linux windows
|
||||
TERRAFORM_PLUGIN_EXTENSION=
|
||||
VERSION=0.14.0# x-release-please-version
|
||||
VERSION_EXAMPLE=9999.0.0
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
TERRAFORM_PLATFORM=windows_amd64
|
||||
@ -14,15 +13,19 @@ else
|
||||
TERRAFORM_PLUGIN_CACHE_DIRECTORY=$(shell pwd -P)/cache/plugins
|
||||
endif
|
||||
|
||||
TERRAFORM_PLUGIN_DIRECTORY=$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)/registry.terraform.io/bpg/proxmox/$(VERSION)/$(TERRAFORM_PLATFORM)
|
||||
TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE=$(TERRAFORM_PLUGIN_CACHE_DIRECTORY)/registry.terraform.io/bpg/proxmox/$(VERSION_EXAMPLE)/$(TERRAFORM_PLATFORM)
|
||||
TERRAFORM_PLUGIN_EXECUTABLE=$(TERRAFORM_PLUGIN_DIRECTORY)/$(NAME)_v$(VERSION)_x4$(TERRAFORM_PLUGIN_EXTENSION)
|
||||
TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE=$(TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE)/$(NAME)_v$(VERSION_EXAMPLE)_x4$(TERRAFORM_PLUGIN_EXTENSION)
|
||||
TERRAFORM_PLUGIN_OUTPUT_DIRECTORY=./build
|
||||
TERRAFORM_PLUGIN_EXECUTABLE=$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)/$(NAME)_v$(VERSION)$(TERRAFORM_PLUGIN_EXTENSION)
|
||||
TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE=$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)/$(NAME)$(TERRAFORM_PLUGIN_EXTENSION)
|
||||
|
||||
default: build
|
||||
|
||||
clean:
|
||||
rm -rf ./dist
|
||||
rm -rf ./cache
|
||||
rm -rf ./build
|
||||
|
||||
build:
|
||||
mkdir -p "$(TERRAFORM_PLUGIN_DIRECTORY)"
|
||||
mkdir -p "$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)"
|
||||
rm -f "$(TERRAFORM_PLUGIN_EXECUTABLE)"
|
||||
go build -o "$(TERRAFORM_PLUGIN_EXECUTABLE)"
|
||||
|
||||
@ -36,8 +39,8 @@ example-apply:
|
||||
&& terraform apply -auto-approve
|
||||
|
||||
example-build:
|
||||
rm -rf "$(TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE)"
|
||||
mkdir -p "$(TERRAFORM_PLUGIN_DIRECTORY_EXAMPLE)"
|
||||
mkdir -p "$(TERRAFORM_PLUGIN_OUTPUT_DIRECTORY)"
|
||||
rm -rf "$(TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE)"
|
||||
go build -o "$(TERRAFORM_PLUGIN_EXECUTABLE_EXAMPLE)"
|
||||
|
||||
example-destroy:
|
||||
@ -75,10 +78,10 @@ test:
|
||||
|
||||
$(TARGETS):
|
||||
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"'
|
||||
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)
|
||||
|
11
example.tfrc
11
example.tfrc
@ -1,9 +1,6 @@
|
||||
provider_installation {
|
||||
filesystem_mirror {
|
||||
path = "../cache/plugins"
|
||||
include = ["registry.terraform.io/bpg/proxmox"]
|
||||
}
|
||||
direct {
|
||||
exclude = ["registry.terraform.io/bpg/proxmox"]
|
||||
}
|
||||
dev_overrides {
|
||||
"bpg/proxmox" = "../build"
|
||||
}
|
||||
direct {}
|
||||
}
|
||||
|
@ -4,13 +4,12 @@ terraform {
|
||||
source = "hashicorp/local"
|
||||
version = "2.2.2"
|
||||
}
|
||||
proxmox = {
|
||||
source = "bpg/proxmox"
|
||||
version = "9999.0.0"
|
||||
}
|
||||
tls = {
|
||||
source = "hashicorp/tls"
|
||||
version = "3.1.0"
|
||||
}
|
||||
proxmox = {
|
||||
source = "bpg/proxmox"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user