Skip to content

Commit

Permalink
Add merge-upstream command
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Sep 14, 2023
1 parent 485ea78 commit 20b9b93
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions script/merge-upstream
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -e


COMMIT=${1?"Usage: $0 <Upstream commit> <optional sed command>"}
SED=${2:-sed}

git config remote.upstream.url || git remote add upstream [email protected]:primer/view_components.git
git fetch upstream

git checkout main
git branch -D bump/primer-upstream &>/dev/null || true
git branch -D bump/primer-upstream-ref &>/dev/null || true

git checkout -b bump/primer-upstream-ref
git reset --hard $COMMIT

git checkout -b bump/primer-upstream
git merge bump/primer-upstream-ref || true

find .changeset/ -name "*.md" -exec $SED -i "s/\@primer\/view-components/\@openproject\/primer-view-components/g" {} +

0 comments on commit 20b9b93

Please sign in to comment.