mirror of
https://github.com/morgan9e/blog
synced 2026-04-15 00:34:35 +09:00
Reset
This commit is contained in:
55
scripts/git-repo-watcher-hooks
Executable file
55
scripts/git-repo-watcher-hooks
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
startup() {
|
||||
echo "Watch started: $*"
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
no_changes() {
|
||||
echo "Nothing changed: $*"
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
# $3 - Commit details
|
||||
change_pulled() {
|
||||
echo "Changes pulled: $*"
|
||||
hugo
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
# $3 - Commit details
|
||||
pull_failed() {
|
||||
echo "Pull failed --> Exiting: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - New branch name
|
||||
# $3 - Old branch name
|
||||
branch_changed() {
|
||||
echo "Branch changed: $*"
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
upstream_not_set() {
|
||||
echo "Upstream not set: $*"
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
local_change() {
|
||||
echo "local file changed: $*"
|
||||
}
|
||||
|
||||
# $1 - Git repository name
|
||||
# $2 - Branch name
|
||||
diverged() {
|
||||
echo "Diverged --> Exiting: $*"
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user