Skip to content

Commit

Permalink
[internal] Update GitHub Actions workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot committed Dec 3, 2024
1 parent 4d624c8 commit 7325272
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,14 @@ apply_patches() {
# Iterating over the patches folder in sorted order,
# apply the patch using a 3-way merge strategy. This mirrors the default behavior of 'git merge'
cd upstream
# Allow directory to be empty
shopt -s nullglob
for patch in ../patches/*.patch; do
if ! git apply --3way "${patch}" --allow-empty; then
err_failed_to_apply "$(basename "${patch}")"
fi
done
shopt -u nullglob
}

clean_rebases() {
Expand Down Expand Up @@ -227,13 +230,16 @@ checkout() {
# Create a new branch 'pulumi/patch-checkout' which will contain the commits for each patch
git checkout -B pulumi/patch-checkout

# Allow directory to be empty
shopt -s nullglob
for patch in ../patches/*.patch; do
if ! git am --3way "${patch}"; then
err_failed_to_apply "$(basename "${patch}")"
fi
done
shopt -u nullglob

cat <<EOF
cat <<EOF
The patches have been checked out as commits in the './upstream' repository.
The 'pulumi/patch-checkout' branch is pointing to the last patch.
Expand Down

0 comments on commit 7325272

Please sign in to comment.