Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#16476 - push new plugins into master branch... #453

Merged
merged 3 commits into from
Apr 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,39 @@ ${lastCommitComment}" -b "${BRANCH}" -h "${PR_BRANCH}"
fi
fi

# 16476 - push new plugins into master branch too, if we're doing a 7.y.z release
if [[ ${BASEBRANCH} != "master" ]] && [[ ${NOCOMMIT} -eq 0 ]]; then
BRANCH=master
BASEBRANCH=master

git fetch origin "${BASEBRANCH}":"${BASEBRANCH}"
git checkout "${BASEBRANCH}"

# add new plugins + update latest.txt files
createNewPlugins "${VERSION}"

# commit change into branch
COMMIT_MSG="[release] Add ${NEXTVERSION} plugins in ${BRANCH}"
git add v3/plugins/eclipse/ || true
git commit -s -m "${COMMIT_MSG}" VERSION v3/plugins/eclipse/
git pull origin "${BRANCH}"

PUSH_TRY="$(git push origin "${BRANCH}")"
# shellcheck disable=SC2181
if [[ $? -gt 0 ]] || [[ $PUSH_TRY == *"protected branch hook declined"* ]]; then
PR_BRANCH=pr-add-${NEXTVERSION}-to-master
# create pull request for master branch, as branch is restricted
git branch "${PR_BRANCH}"
git checkout "${PR_BRANCH}"
git pull origin "${PR_BRANCH}"
git push origin "${PR_BRANCH}"
lastCommitComment="$(git log -1 --pretty=%B)"
hub pull-request -o -f -m "${lastCommitComment}

${lastCommitComment}" -b "${BRANCH}" -h "${PR_BRANCH}"
fi
fi

popd > /dev/null || exit

# cleanup tmp dir
Expand Down