smsdev 0.1.0

The SMSDev client wrapper.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
LC_ALL=C

local_branch="$(git rev-parse --abbrev-ref HEAD)"

valid_branch_regex="^(gitauto|dependabot|feature|fix|docs|style|refactor|perf|hotfix|test|chore|create)\/[a-zA-Z0-9.#_-]+$"

message="There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex. Your commit will be rejected. You should rename your branch to a valid name and try again."

if [[ ! $local_branch =~ $valid_branch_regex ]]
then
    echo "$message"
    exit 1
fi