File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 88source " $( dirname $0 ) /install/_lib.sh" # does a `cd .../install/`, among other things
99
1010source parse-cli.sh
11+ source check-latest-commit.sh
1112source error-handling.sh
1213source check-minimum-requirements.sh
1314source create-docker-volumes.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Checks if we are on latest commit from github if it is running from master branch
4+ if [[ -d " ../.git" && " ${SKIP_COMMIT_CHECK:- 0} " != 1 ]]; then
5+ if [[ $( git branch | sed -n ' /\* /s///p' ) == " master" ]]; then
6+ if [[ $( git rev-parse HEAD) != $( git ls-remote $( git rev-parse --abbrev-ref @{u} | sed ' s/\// /g' ) | cut -f1) ]]; then
7+ echo " Seems like you are not using the latest commit from self-hosted repository. Please pull the latest changes and try again." ;
8+ exit 1
9+ fi
10+ fi
11+ fi
Original file line number Diff line number Diff line change 1717
1818SKIP_USER_PROMPT=" ${SKIP_USER_PROMPT:- } "
1919MINIMIZE_DOWNTIME=" ${MINIMIZE_DOWNTIME:- } "
20+ SKIP_COMMIT_CHECK=" ${SKIP_COMMIT_CHECK:- } "
2021
2122while (( $# )) ; do
2223 case " $1 " in
2324 -h | --help) show_help; exit ;;
2425 --no-user-prompt) SKIP_USER_PROMPT=1;;
2526 --minimize-downtime) MINIMIZE_DOWNTIME=1;;
27+ --skip-commit-check) SKIP_COMMIT_CHECK=1;;
2628 --) ;;
2729 * ) echo " Unexpected argument: $1 . Use --help for usage information." ; exit 1;;
2830 esac
You can’t perform that action at this time.
0 commit comments