Skip to content

Commit

Permalink
fix(presets): improve naming for properly calling
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Apr 25, 2024
1 parent 95d95ac commit 3384eaa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions presets/conventional-commits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,27 @@ parse_commit() {
return 0
fi

if isValidCommitType "$type" "${RELEASE_SKIP_TYPES[@]}"; then
if is_valid_commit_type "$type" "${RELEASE_SKIP_TYPES[@]}"; then
return 0
elif isValidCommitType "$type" "${RELEASE_PATCH_TYPES[@]}"; then
elif is_valid_commit_type "$type" "${RELEASE_PATCH_TYPES[@]}"; then
if ! $PATCH_UPGRADED; then
PATCH_UPGRADED=true
RELEASE_BODY+="\n## Bug Fixes\n\n"
fi
elif isValidCommitType "$type" "${RELEASE_MINOR_TYPES[@]}"; then
elif is_valid_commit_type "$type" "${RELEASE_MINOR_TYPES[@]}"; then
if ! $MINOR_UPGRADED; then
MINOR_UPGRADED=true
RELEASE_BODY+="\n## Features\n\n"
fi
elif isValidCommitType "$type" "${RELEASE_MAJOR_TYPES[@]}"; then
elif is_valid_commit_type "$type" "${RELEASE_MAJOR_TYPES[@]}"; then
if ! $MAJOR_UPGRADED; then
MAJOR_UPGRADED=true
RELEASE_BODY+="\n## BREAKING CHANGES\n\n"
fi
fi

RELEASE_BODY+="- "
if isValidCommitType "$type" "${INCLUDE_SCOPE[@]}"; then
if is_valid_commit_type "$type" "${INCLUDE_SCOPE[@]}"; then
RELEASE_BODY+="**\`[$type]\`** "
fi

Expand Down
10 changes: 5 additions & 5 deletions presets/workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,26 @@ parse_commit() {
return 0
fi

if isValidCommitType "$type" "${RELEASE_SKIP_TYPES[@]}"; then
if is_valid_commit_type "$type" "${RELEASE_SKIP_TYPES[@]}"; then
return 0
elif isValidCommitType "$type" "${RELEASE_PATCH_TYPES[@]}"; then
elif is_valid_commit_type "$type" "${RELEASE_PATCH_TYPES[@]}"; then
if ! $PATCH_UPGRADED; then
PATCH_UPGRADED=true
RELEASE_BODY+="\n## Bug Fixes\n\n"
fi
elif isValidCommitType "$type" "${RELEASE_MINOR_TYPES[@]}"; then
elif is_valid_commit_type "$type" "${RELEASE_MINOR_TYPES[@]}"; then
if ! $MINOR_UPGRADED; then
MINOR_UPGRADED=true
RELEASE_BODY+="\n## Features\n\n"
fi
elif isValidCommitType "$type" "${RELEASE_MAJOR_TYPES[@]}"; then
elif is_valid_commit_type "$type" "${RELEASE_MAJOR_TYPES[@]}"; then
if ! $MAJOR_UPGRADED; then
MAJOR_UPGRADED=true
RELEASE_BODY+="\n## BREAKING CHANGES\n\n"
fi
fi

if isValidCommitType "$type" "${INCLUDE_SCOPE[@]}"; then
if is_valid_commit_type "$type" "${INCLUDE_SCOPE[@]}"; then
RELEASE_BODY+="- **$PKG_NAME**: **\`[$type]\`** $description "
else
RELEASE_BODY+="- **$PKG_NAME**: $description "
Expand Down

0 comments on commit 3384eaa

Please sign in to comment.