Skip to content

Commit

Permalink
update-dmd-rewrite.sh: Work around filter-repo weirdness (#4788)
Browse files Browse the repository at this point in the history
The default replacement of commit refs from original to rewritten
hash seems to hick up occasionally for one commit, not always replacing
the original hash. I've now hit this two or three times for a recent-ish
DMD master commit, which was cherry-picked to stable upstream. Replace
the hash manually to the correct one (in our dmd-rewrite-master branch).
  • Loading branch information
kinke authored Nov 27, 2024
1 parent 64dd9c0 commit e241b93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/update-dmd-rewrite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ temp_dir="$(mktemp -d)"
cd "$temp_dir"

# generate message-filters.txt file for replacing GitHub refs in commit messages
echo 'regex:(^|\s|\()#(\d{2,})==>\1dlang/dmd!\2' > message-filters.txt
cat > message-filters.txt <<'EOF'
regex:(^|\s|\()#(\d{2,})==>\1dlang/dmd!\2
(cherry picked from commit 88d1e8fc37428b873f59d87f8dff1f40fbd3e7a3)==>(cherry picked from commit 8b9b481a322bdcbfdad38ba4ad74182742aef118)
EOF

# clone DMD monorepo
git clone [email protected]:dlang/dmd.git dmd.tmp
Expand Down Expand Up @@ -104,7 +107,7 @@ if [[ "$initialize" != 1 ]]; then
fi

# push prefixed master/stable branches and tags
git push --tags ldc "${refs_prefix}master" "${refs_prefix}stable"
git push --tags --atomic ldc "${refs_prefix}master" "${refs_prefix}stable"

cd ../..
rm -rf "$temp_dir"

0 comments on commit e241b93

Please sign in to comment.