UNPKG

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