pungi-rocky/sync-from-upstream

21 lines
539 B
Plaintext
Raw Normal View History

2023-09-21 16:42:43 +00:00
#!/bin/bash
HOWMANY="-$1"
if [ -z $1 ]; then
HOWMANY="-1"
fi
BRANCH=$(git branch --show-current)
if [[ ! "${BRANCH}" =~ "r10s" ]]; then
echo "Not a lookahead branch."
exit 1
fi
echo "Fetching from upstream"
2023-09-22 20:10:08 +00:00
git fetch https://gitlab.com/redhat/centos-stream/release-engineering/pungi-centos.git centos-10-stream
2023-09-21 16:42:43 +00:00
echo "Formatting patch and applying..."
git format-patch --stdout ${HOWMANY} FETCH_HEAD | sed -e 's|centos/|rocky/|' | git apply
echo "!! DIFF OF CHANGES !!"
git --no-pager diff HEAD
echo "You may now commit and push."