-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs and output tinkering for commit check (#1191)
- Loading branch information
1 parent
3c060fc
commit 596be66
Showing
3 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
#!/bin/bash | ||
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 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 self-hosted repository. Please pull the latest changes and try again."; | ||
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 | ||
fi | ||
fi | ||
else | ||
echo "skipped" | ||
fi | ||
|
||
echo "${_endgroup}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters