mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
feat(scripts): check that git is installed in release scripts
This commit is contained in:
2 files changed
+2
No files matched your search
@@ -8,6 +8,7 @@ info() { echo -e " ${BLUE}info:${OFF} $1"; }
|
||||
success() { echo -e " ${GREEN}done:${OFF} $1"; }
|
||||
|
||||
check_prerequisites() {
|
||||
command -v git > /dev/null 2>&1 || die "git is not installed. Install it from https://git-scm.com"
|
||||
git rev-parse --is-inside-work-tree > /dev/null 2>&1 || die "Not a git repository"
|
||||
|
||||
if ! git diff --quiet || ! git diff --cached --quiet; then
|
||||
|
||||
@@ -8,6 +8,7 @@ info() { echo -e " ${BLUE}info:${OFF} $1"; }
|
||||
die() { echo -e " ${RED}error:${OFF} $1" >&2; exit 1; }
|
||||
|
||||
check_prerequisites() {
|
||||
command -v git > /dev/null 2>&1 || die "git is not installed. Install it from https://git-scm.com"
|
||||
git rev-parse --is-inside-work-tree > /dev/null 2>&1 || die "Not a git repository"
|
||||
|
||||
REPO_ROOT="$(git rev-parse --show-toplevel)"
|
||||
|
||||
Reference in new issue
Block a user