Skip to content

Commit 79c8025

Browse files
committed
add script to sync upstream
1 parent 4a29021 commit 79c8025

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

upstream_sync.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
git remote set upstream https://github.com/ShiftLeftSecurity/overflowdb
6+
7+
usage() {
8+
echo "Usage: $0 [--publish]"
9+
exit 1
10+
}
11+
12+
PUBLISH=false
13+
while [[ "$#" -gt 0 ]]; do
14+
case $1 in
15+
--publish) PUBLISH=true ;;
16+
*) usage ;;
17+
esac
18+
shift
19+
done
20+
21+
git fetch upstream
22+
23+
git checkout sync
24+
git merge upstream/master
25+
git push origin sync
26+
27+
if [ "$PUBLISH" = true ]; then
28+
git checkout master
29+
git merge sync
30+
git push origin master
31+
fi

0 commit comments

Comments
 (0)