From 7ed3cbf89b21db48cce9484b7261923417f94c9d Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Fri, 4 Oct 2024 13:48:14 -0400 Subject: [PATCH 1/2] Permit custom Make targets The standard workflows are great, but sometimes build-time complexity is a necessary evil for temporary or experimental features. One concrete use case is simplifying computing the minimal schema in AWS: https://github.com/pulumi/pulumi-aws/pull/4587 This small change permits providers to define *.mk files to add some provider-specific extensions to Make. --- provider-ci/internal/pkg/templates/bridged-provider/Makefile | 3 +++ provider-ci/test-providers/acme/Makefile | 3 +++ provider-ci/test-providers/aws/Makefile | 3 +++ provider-ci/test-providers/cloudflare/Makefile | 3 +++ provider-ci/test-providers/docker/Makefile | 3 +++ 5 files changed, 15 insertions(+) diff --git a/provider-ci/internal/pkg/templates/bridged-provider/Makefile b/provider-ci/internal/pkg/templates/bridged-provider/Makefile index d812eac72b..184f7f684a 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/Makefile +++ b/provider-ci/internal/pkg/templates/bridged-provider/Makefile @@ -282,3 +282,6 @@ provider_dist-darwin-arm64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-darwin-arm64.tar provider_dist-windows-amd64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-windows-amd64.tar.gz provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist + +# Permit providers to extend the Makefile with provider-specific Make includes. +include *.mk diff --git a/provider-ci/test-providers/acme/Makefile b/provider-ci/test-providers/acme/Makefile index 1943ffa22a..ae722d39c9 100644 --- a/provider-ci/test-providers/acme/Makefile +++ b/provider-ci/test-providers/acme/Makefile @@ -242,3 +242,6 @@ provider_dist-darwin-arm64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-darwin-arm64.tar provider_dist-windows-amd64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-windows-amd64.tar.gz provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist + +# Permit providers to extend the Makefile with provider-specific Make includes. +include *.mk diff --git a/provider-ci/test-providers/aws/Makefile b/provider-ci/test-providers/aws/Makefile index b0d4f27533..1f96cfc99d 100644 --- a/provider-ci/test-providers/aws/Makefile +++ b/provider-ci/test-providers/aws/Makefile @@ -257,3 +257,6 @@ provider_dist-darwin-arm64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-darwin-arm64.tar provider_dist-windows-amd64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-windows-amd64.tar.gz provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist + +# Permit providers to extend the Makefile with provider-specific Make includes. +include *.mk diff --git a/provider-ci/test-providers/cloudflare/Makefile b/provider-ci/test-providers/cloudflare/Makefile index 3ffb0b5238..73ff31b6bb 100644 --- a/provider-ci/test-providers/cloudflare/Makefile +++ b/provider-ci/test-providers/cloudflare/Makefile @@ -250,3 +250,6 @@ provider_dist-darwin-arm64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-darwin-arm64.tar provider_dist-windows-amd64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-windows-amd64.tar.gz provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist + +# Permit providers to extend the Makefile with provider-specific Make includes. +include *.mk diff --git a/provider-ci/test-providers/docker/Makefile b/provider-ci/test-providers/docker/Makefile index 6fd51ba994..075f4dc035 100644 --- a/provider-ci/test-providers/docker/Makefile +++ b/provider-ci/test-providers/docker/Makefile @@ -251,3 +251,6 @@ provider_dist-darwin-arm64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-darwin-arm64.tar provider_dist-windows-amd64: bin/$(PROVIDER)-v$(VERSION_GENERIC)-windows-amd64.tar.gz provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist + +# Permit providers to extend the Makefile with provider-specific Make includes. +include *.mk From 9e16e5ef5f38cdd30fb22c8f4cb486e7291cb5f0 Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Fri, 4 Oct 2024 13:55:51 -0400 Subject: [PATCH 2/2] Fix for the zero case --- provider-ci/internal/pkg/templates/bridged-provider/Makefile | 2 +- provider-ci/test-providers/acme/Makefile | 2 +- provider-ci/test-providers/aws/Makefile | 2 +- provider-ci/test-providers/cloudflare/Makefile | 2 +- provider-ci/test-providers/docker/Makefile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/provider-ci/internal/pkg/templates/bridged-provider/Makefile b/provider-ci/internal/pkg/templates/bridged-provider/Makefile index 184f7f684a..70e0ee0290 100644 --- a/provider-ci/internal/pkg/templates/bridged-provider/Makefile +++ b/provider-ci/internal/pkg/templates/bridged-provider/Makefile @@ -284,4 +284,4 @@ provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist # Permit providers to extend the Makefile with provider-specific Make includes. -include *.mk +include $(wildcard .mk/*.mk) diff --git a/provider-ci/test-providers/acme/Makefile b/provider-ci/test-providers/acme/Makefile index ae722d39c9..b00f75a978 100644 --- a/provider-ci/test-providers/acme/Makefile +++ b/provider-ci/test-providers/acme/Makefile @@ -244,4 +244,4 @@ provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist # Permit providers to extend the Makefile with provider-specific Make includes. -include *.mk +include $(wildcard .mk/*.mk) diff --git a/provider-ci/test-providers/aws/Makefile b/provider-ci/test-providers/aws/Makefile index 1f96cfc99d..3cec6ea2e2 100644 --- a/provider-ci/test-providers/aws/Makefile +++ b/provider-ci/test-providers/aws/Makefile @@ -259,4 +259,4 @@ provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist # Permit providers to extend the Makefile with provider-specific Make includes. -include *.mk +include $(wildcard .mk/*.mk) diff --git a/provider-ci/test-providers/cloudflare/Makefile b/provider-ci/test-providers/cloudflare/Makefile index 73ff31b6bb..d125a6a40d 100644 --- a/provider-ci/test-providers/cloudflare/Makefile +++ b/provider-ci/test-providers/cloudflare/Makefile @@ -252,4 +252,4 @@ provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist # Permit providers to extend the Makefile with provider-specific Make includes. -include *.mk +include $(wildcard .mk/*.mk) diff --git a/provider-ci/test-providers/docker/Makefile b/provider-ci/test-providers/docker/Makefile index 075f4dc035..9da4c00dde 100644 --- a/provider-ci/test-providers/docker/Makefile +++ b/provider-ci/test-providers/docker/Makefile @@ -253,4 +253,4 @@ provider_dist: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist .PHONY: provider_dist-linux-amd64 provider_dist-linux-arm64 provider_dist-darwin-amd64 provider_dist-darwin-arm64 provider_dist-windows-amd64 provider_dist # Permit providers to extend the Makefile with provider-specific Make includes. -include *.mk +include $(wildcard .mk/*.mk)