Skip to content
Snippets Groups Projects
Commit 49966c98 authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

Add "mr pullup" subcommand to pull updates from upstream repos

parent 707adc12
No related branches found
No related tags found
No related merge requests found
[DEFAULT]
git_pullup = "$(dirname "$MR_CONFIG")/bin/pull-from-upstream"
[swh-site]
checkout = git clone https://forge.softwareheritage.org/source/puppet-swh-site.git swh-site \
&& cd swh-site \
......
#!/bin/bash
set -e
if [ -d .git/refs/remotes/upstream ]; then
git fetch upstream
oldbranch=$(git rev-parse --abbrev-ref HEAD)
if [ "$oldbranch" != "master" ]; then
git checkout master
fi
git merge upstream/master
git push origin master:master --tags
if [ "$oldbranch" != "master" ]; then
git checkout $oldbranch
fi
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment