From fc92ba1298b98055bad64146b179beb1ac8719f9 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Mon, 23 Oct 2023 22:54:58 -0700 Subject: [PATCH] Update GitHub Actions workflows. (#194) This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit 635ddcc9483288969a082bbe9fa07c4d093f80e4. --- Makefile | 8 ++++---- scripts/upstream.sh | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) mode change 100644 => 100755 scripts/upstream.sh diff --git a/Makefile b/Makefile index 7964376..8bd8f95 100644 --- a/Makefile +++ b/Makefile @@ -119,17 +119,17 @@ tfgen: install_plugins upstream upstream: ifneq ("$(wildcard upstream)","") - @$(SHELL) ./scripts/upstream.sh "$@" apply + scripts/upstream.sh "$@" apply endif upstream.finalize: - @$(SHELL) ./scripts/upstream.sh "$@" end_rebase + scripts/upstream.sh "$@" end_rebase upstream.rebase: - @$(SHELL) ./scripts/upstream.sh "$@" start_rebase + scripts/upstream.sh "$@" start_rebase bin/pulumi-java-gen: - $(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java) + pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java # To make an immediately observable change to .ci-mgmt.yaml: # diff --git a/scripts/upstream.sh b/scripts/upstream.sh old mode 100644 new mode 100755 index c455b46..84f57d7 --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt set -e @@ -163,8 +164,11 @@ EOF # It is used to make the error message more actionable. end_rebase() { assert_rebase_in_progress "$1" + # Use git to resolve the possible location of files indicating a rebase might be in progress. + rebase_merge_dir=$(cd upstream && git rev-parse --git-path rebase-merge) + rebase_apply_dir=$(cd upstream && git rev-parse --git-path rebase-apply) - if [ -d .git/modules/upstream/rebase-merge ]; then + if [[ -d "${rebase_merge_dir}" || -d "${rebase_apply_dir}" ]]; then echo "rebase still in progress in './upstream'. Please resolve the rebase in" echo "'./upstream' and then run 'make \"$1\"' again." exit 1 @@ -172,8 +176,10 @@ end_rebase() { rm patches/*.patch cd upstream - git format-patch local -o ../patches - rm ../rebase-in-progress + git format-patch local -o ../patches --no-prefix --zero-commit --no-signature --no-stat + cd .. + rm rebase-in-progress + apply "$1" } case $2 in