Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions workflows. #239

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
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
Loading