Skip to content

Commit

Permalink
support windows for local e2e testing
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-the-programmer committed Jan 31, 2023
1 parent d0c6d8d commit 928a39d
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,43 @@ acceptance:
test-stack: set-local
terraform -chdir=examples/resources/minikube_cluster init || true
terraform -chdir=examples/resources/minikube_cluster apply --auto-approve
terraform -chdir=tests destroy --auto-approve
terraform -chdir=examples/resources/minikube_cluster destroy --auto-approve

.PHONY: build
build:
go build -o bin/terraform-provider-minikube

.PHONY: set-local
set-local: build
set-local: build
ifeq ($(OS), Windows_NT)
#amd64
mkdir -p $$APPDATA/terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/windows_amd64
cp bin/terraform-provider-minikube $$APPDATA/terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/windows_amd64/terraform-provider-minikube.exe

#arm64
mkdir -p $$APPDATA/terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/windows_arm64
cp bin/terraform-provider-minikube $$APPDATA/terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/windows_arm64/terraform-provider-minikube.exe

else
#amd64
mkdir -p $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/linux_amd64
mkdir -p $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/darwin_amd64
cp bin/terraform-provider-minikube $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/linux_amd64/terraform-provider-minikube
cp bin/terraform-provider-minikube $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/darwin_amd64/terraform-provider-minikube

#arm64
mkdir -p $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/linux_arm64
mkdir -p $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/darwin_arm64
cp bin/terraform-provider-minikube $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/linux_arm64/terraform-provider-minikube
cp bin/terraform-provider-minikube $$HOME/.terraform.d/plugins/registry.terraform.io/scott-the-programmer/minikube/99.99.99/darwin_arm64/terraform-provider-minikube
endif




.PHONY: set-local-windows
set-local: build

SED_FLAGS := -i
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
Expand Down

0 comments on commit 928a39d

Please sign in to comment.