Skip to content

Commit

Permalink
fix: fix typo in variable' script, closes #82
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasfara committed Aug 6, 2022
1 parent 100c679 commit 2108992
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal fun writeScript(
scopes: List<String>,
warningIfNoGitRoot: Boolean,
successMessage: String?,
failureMessage: String?,
failureMessage: String?
) {
project.logger.debug("Finding the '.git' folder")
generateSequence(baseDir) { it.parentFile }.find { it.isGitFolder() }?.let {
Expand All @@ -29,7 +29,7 @@ private fun createCommitMessage(
types: List<String>,
scopes: List<String>,
successMessage: String?,
failureMessage: String?,
failureMessage: String?
): String {
val typesRegex = types.joinToString("|")
val scopesRegex = if (scopes.isEmpty()) "[a-z \\-]+" else scopes.joinToString("|")
Expand All @@ -46,7 +46,7 @@ private fun createCommitMessage(
commit_message=$(cat "$1")
# Check the message, if we match, all good baby.
if [[ "${'$'}commit_message" =~ ${'$'}conventional_commit_regex ]]; then
if [[ "${'$'}commit_message" =~ ${'$'}conventional_commits_regex ]]; then
$successMessageEcho
exit 0
fi
Expand Down

0 comments on commit 2108992

Please sign in to comment.