Skip to content

Commit b5134c1

Browse files
more
1 parent 2c88a21 commit b5134c1

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

merge-dev-to-master.sh

+17-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
#!/bin/bash
2-
rm -f include/build_timestamp.h
3-
git checkout include/build_timestamp.h
2+
curbranch=`git branch | grep \* | cut -d ' ' -f 2`
43

5-
git checkout develop
6-
git pull
7-
git push
4+
if [[ x"$curbranch" == x"master" || x"$curbranch" == x"develop" ]]; then
5+
rm -f include/build_timestamp.h
6+
git checkout include/build_timestamp.h
87

9-
rm -f include/build_timestamp.h
10-
git checkout include/build_timestamp.h
8+
git checkout develop
9+
git pull
10+
git push
1111

12-
git checkout master
13-
git pull
14-
git push
12+
rm -f include/build_timestamp.h
13+
git checkout include/build_timestamp.h
1514

16-
rm -f include/build_timestamp.h
17-
git checkout include/build_timestamp.h
15+
git checkout master
16+
git pull
17+
git push
1818

19-
git checkout master && git merge develop && git checkout develop && git merge master && git fetch --all && git push --all && make -j
19+
rm -f include/build_timestamp.h
20+
git checkout include/build_timestamp.h
21+
22+
git checkout master && git merge develop && git checkout develop && git merge master && git fetch --all && git push --all && make -j
23+
fi

0 commit comments

Comments
 (0)