diff --git a/.github/workflows/prerequisites.yml b/.github/workflows/prerequisites.yml index 67da0900..67250b3d 100644 --- a/.github/workflows/prerequisites.yml +++ b/.github/workflows/prerequisites.yml @@ -52,6 +52,7 @@ jobs: - uses: pulumi/provider-version-action@f96d032a2758fdda7939e5728eff6c0d980ae894 # v1.6.0 id: provider-version with: + major-version: 8 set-env: 'PROVIDER_VERSION' - name: Cache examples generation uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d207c052..fcc9f678 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -77,6 +77,14 @@ jobs: path: dist # Don't create a directory for each artifact merge-multiple: true + - name: Download schema + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + # Use a pattern to avoid failing if the artifact doesn't exist + pattern: schema-embed.* + # Avoid creating directories for each artifact + merge-multiple: true + path: dist - name: Calculate checksums working-directory: dist run: shasum ./*.tar.gz > "pulumi-fastly_${{ inputs.version }}_checksums.txt" diff --git a/Makefile b/Makefile index 6146fbc9..e939d9cc 100644 --- a/Makefile +++ b/Makefile @@ -268,11 +268,9 @@ bin/$(CODEGEN): provider/*.go provider/go.* .make/upstream # Apply patches to the upstream submodule, if it exists upstream: .make/upstream -# Re-run if the upstream commit or the patches change -.make/upstream: $(wildcard patches/*) $(shell ./upstream.sh file_target) -ifneq ("$(wildcard upstream)","") - ./upstream.sh init -endif +# Re-run if the upstream commit or the patches change. +.make/upstream: $(wildcard patches/*) $(shell ./scripts/upstream.sh file_target) + ./scripts/upstream.sh init @touch $@ .PHONY: upstream diff --git a/upstream.sh b/scripts/upstream.sh similarity index 99% rename from upstream.sh rename to scripts/upstream.sh index 736b9854..54cd6496 100755 --- a/upstream.sh +++ b/scripts/upstream.sh @@ -182,7 +182,10 @@ init() { esac done - assert_upstream_exists + if [[ ! -d upstream ]]; then + echo "No 'upstream' directory detected. Skipping init." + exit 0 + fi if [[ "${force}" != "true" ]]; then assert_not_checked_out