mirror of
https://github.com/getsentry/self-hosted.git
synced 2026-02-06 10:57:17 +00:00
ref: use git branch --show-current instead of sed (#2550)
This commit is contained in:
parent
186aa6ec2f
commit
f43ffd4bb2
@ -2,7 +2,7 @@ echo "${_group}Checking for latest commit ... "
|
||||
|
||||
# Checks if we are on latest commit from github if it is running from master branch
|
||||
if [[ -d "../.git" && "${SKIP_COMMIT_CHECK:-0}" != 1 ]]; then
|
||||
if [[ $(git branch | sed -n '/\* /s///p') == "master" ]]; then
|
||||
if [[ $(git branch --show-current) == "master" ]]; then
|
||||
if [[ $(git rev-parse HEAD) != $(git ls-remote $(git rev-parse --abbrev-ref @{u} | sed 's/\// /g') | cut -f1) ]]; then
|
||||
echo "Seems like you are not using the latest commit from the self-hosted repository. Please pull the latest changes and try again, or suppress this check with --skip-commit-check."
|
||||
exit 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user