1 | #!/bin/sh
|
2 | export MERGE_BASE=`cat MERGE_BASE`
|
3 |
|
4 | export SCBRANCH=master
|
5 | echo Using swagger-codegen/$SCBRANCH@$MERGE_BASE
|
6 | cd ../swagger-codegen
|
7 | git checkout $SCBRANCH
|
8 | git branch -D tmp 2> /dev/null
|
9 | git pull
|
10 | export NEWBASE=`git rev-parse HEAD`
|
11 | git checkout -b tmp $MERGE_BASE
|
12 | cp -pr ../openapi-codegen/templates/* modules/swagger-codegen/src/main/resources/
|
13 | git diff
|
14 | git add modules
|
15 | git commit -m "Temporary commit"
|
16 | git rebase $SCBRANCH
|
17 | rc=$?
|
18 | if [ $rc != 0 ]; then
|
19 | echo You need to complete the rebase... then update to $NEWBASE
|
20 | exit $rc
|
21 | fi
|
22 | cd ../swagger-codegen
|
23 | cp -pr modules/swagger-codegen/src/main/resources/* ../openapi-codegen/templates/
|
24 | git checkout $SCBRANCH
|
25 | git branch -D tmp
|
26 | echo $NEWBASE > ../openapi-codegen/MERGE_BASE
|