Generic-Template/setup.sh

127 lines
1.3 KiB
Bash
Raw Normal View History

2023-12-04 23:35:25 +00:00
#!/bin/bash
#
# Generic script to setup the repository for local development
echo "Installing pre-commit"
pip install pre-commit
pre-commit install
echo "Installing commit-msg"
HOOK_LOCATION=".git/hooks/commit-msg"
VERB_LOCATION=".git/hooks/verbs.txt"
cat << 'EOF' > "$HOOK_LOCATION"
#!/bin/sh
#
# Git hook to check for semantic commit messages in the form mentioned here
2023-12-04 23:41:30 +00:00
export VERB=$(cut -d ' ' -f1 < "$1")
2023-12-04 23:35:25 +00:00
(grep "$VERB" .git/hooks/verbs.txt > /dev/null) || (echo "Missing a verb"; exit 1)
EOF
2023-12-04 23:41:30 +00:00
chmod +x $HOOK_LOCATION
2023-12-04 23:35:25 +00:00
cat << 'EOF' > "$VERB_LOCATION"
2023-12-04 23:45:30 +00:00
Add
Update
Fix
Refactor
2023-12-04 23:35:25 +00:00
Remove
2023-12-04 23:45:30 +00:00
Implement
Enhance
Optimize
Revise
Adjust
Modify
Rewrite
Improve
Correct
Debug
2023-12-04 23:35:25 +00:00
Delete
2023-12-04 23:45:30 +00:00
Replace
2023-12-04 23:35:25 +00:00
Create
2023-12-04 23:45:30 +00:00
Design
Develop
2023-12-04 23:35:25 +00:00
Build
2023-12-04 23:45:30 +00:00
Configure
Resolve
Patch
Extend
Reduce
Increase
Simplify
2023-12-04 23:35:25 +00:00
Merge
2023-12-04 23:45:30 +00:00
Split
Release
Deploy
Test
Validate
Format
Organize
Reorganize
Rename
Repackage
Refine
Rework
Expand
Collapse
Integrate
Extract
Introduce
Finalize
Prepare
Generate
Convert
Upload
Download
Sync
Encrypt
Decrypt
Authenticate
Authorize
Invalidate
Sanitize
Analyze
Inspect
Probe
Examine
Index
Compress
Decompress
Archive
Restore
Save
Load
Export
Import
Visualize
Illustrate
Diagram
Plot
Map
Scan
Seek
Find
Discover
Track
Monitor
Observe
Watch
Alert
Notify
Log
Record
Report
Summarize
Detail
Document
Annotate
Comment
Explain
Clarify
Define
Enumerate
Stabilize
2023-12-04 23:35:25 +00:00
EOF