Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#475)
Browse files Browse the repository at this point in the history
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit 635ddcc9483288969a082bbe9fa07c4d093f80e4.
  • Loading branch information
pulumi-bot committed Oct 24, 2023
1 parent dfcf1db commit 0acd760
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,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:
#
Expand Down
12 changes: 9 additions & 3 deletions scripts/upstream.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -163,17 +164,22 @@ 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
fi

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
Expand Down

0 comments on commit 0acd760

Please sign in to comment.