File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,15 @@ jobs:
143
143
if ! [[ $CIRCLE_BRANCH = 'master' ]]
144
144
then
145
145
git fetch --all
146
- REBASE_BASE=$(git merge-base --fork-point HEAD)
147
- GIT_SEQUENCE_EDITOR=dev/circleci_data/drop_version_bump_commits git rebase -X ours -i $REBASE_BASE --empty drop
146
+ if [[ -n ${CIRCLE_PR_NUMBER} && -n ${GITHUB_PR_BASE_TOKEN} ]]
147
+ then
148
+ curl -L "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64" -o jq
149
+ chmod +x jq
150
+ REBASE_BASE=origin/$(curl -u shnizzedy:$GITHUB_PR_BASE_TOKEN "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER" | jq '.base.ref' | tr -d '"')
151
+ else
152
+ REBASE_BASE=$(git rev-parse --short HEAD~30)
153
+ fi
154
+ GIT_SEQUENCE_EDITOR=dev/circleci_data/drop_version_bump_commits git rebase -X ours -i $REBASE_BASE --empty drop
148
155
fi
149
156
echo "v${VERSION}" > version
150
157
sed -i -r "s/^(# [Vv]ersion ).*$/# Version ${VERSION}/g" dev/docker_data/default_pipeline.yml
You can’t perform that action at this time.
0 commit comments