Skip to content

Commit

Permalink
fix(core): empty repo crash/error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Apr 26, 2024
1 parent 1e010f1 commit b71bea1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ GIT_LOGS=""
get_git_commits() {
local IFS=
local GIT_LOGS_LENGTH=0

# Fast early-catch empty repository
if ! git rev-parse HEAD 1>/dev/null 2>&1; then
up_to_date "You have not committed yet"
fi

# Check if exists last tag and is not empty
if [ -n "$GIT_LAST_PROJECT_TAG" ]; then
log_verbose "Last project tag [$GIT_LAST_PROJECT_TAG] found"
Expand Down

0 comments on commit b71bea1

Please sign in to comment.