13 lines
281 B
Bash
Executable File
13 lines
281 B
Bash
Executable File
#!/bin/bash
|
|
|
|
jira_ticket=$(echo $(pwd) | grep -oE "(ETICS|CDK|IM|OM|ITSM|GPMAPS)-[0-9]+" | tail -n1)
|
|
|
|
if [ -z $jira_ticket ]; then
|
|
echo "[ERROR] No Jira Ticket was found in current working directory"
|
|
exit 1
|
|
fi
|
|
|
|
commit_message=$1
|
|
|
|
git commit -m "[$jira_ticket] $commit_message"
|