Commit 7e762ebd authored by Markus Frosch's avatar Markus Frosch
Browse files

release: Check only if remote is newer

parent d3d1251f
Pipeline #5291 passed with stage
in 24 seconds
......@@ -80,11 +80,11 @@ echo "Fetching latest git version from ${GIT_REMOTE}"
(set -x; git fetch -p "${GIT_REMOTE}")
git_branch="$(git rev-parse --abbrev-ref HEAD)"
git_commit="$(git rev-parse HEAD)"
git_commit_upstream="$(git rev-parse "${GIT_REMOTE}/${git_branch}")"
if [ "${git_commit}" != "${git_commit_upstream}" ]; then
git_merge_base="$(git merge-base HEAD "${GIT_REMOTE}/${git_branch}")"
if [ "${git_merge_base}" != "${git_commit_upstream}" ]; then
git status
fail "Local and remote branch ${git_branch} are not in sync!"
fail "Remote branch ${GIT_REMOTE}/${git_branch} is newer than local branch!"
# Check uncommited files
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment