mirror of
https://github.com/sasjs/core.git
synced 2025-12-15 16:14:36 +00:00
11 lines
312 B
Bash
Executable File
11 lines
312 B
Bash
Executable File
#!/bin/bash
|
|
sasjs lint
|
|
|
|
# Avoid commits to the master branch
|
|
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
|
|
|
if [[ "$BRANCH" =~ ^(master|main|develop)$ ]]; then
|
|
echo "You are on branch $BRANCH. Are you sure you want to commit to this branch?"
|
|
echo "If so, commit with -n to bypass the pre-commit hook."
|
|
exit 1
|
|
fi |