-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
☁️ chore(automation): Applying changes from upstream repository.
- Loading branch information
Megabyte Labs
committed
Dec 6, 2022
1 parent
d68f54f
commit 02f4e2b
Showing
14 changed files
with
674 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,18 @@ | |
# @arg $1 The name of the remote (e.g. origin) | ||
# @arg $2 The location of the remote (e.g. [email protected]:megabyte-labs/common/angular.git) | ||
|
||
[ -f .config/log ] && chmod +x .config/log | ||
# @description Register appropriate logging utility | ||
if [ -f "$(dirname "$0")/../.config/log" ]; then | ||
alias logger="$(dirname "$0")/../.config/log" | ||
chmod +x "$(dirname "$0")/../.config/log" | ||
elif command -v logg > /dev/null; then | ||
alias logger='logg' | ||
fi | ||
|
||
if [ -f "$(dirname "$0")/_/husky.sh" ]; then | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
# Attempt to register Bodega/Task from common places if it is not in PATH | ||
# Attempt to register Task from common places if it is not in PATH | ||
if ! type task > /dev/null; then | ||
PATH="$PATH:$HOME/.local/go/bin:$HOME/.local/bin:$HOME/bin:$HOME/go/bin:$HOME/.asdf/shims" | ||
if ! type task > /dev/null; then | ||
|
@@ -23,13 +30,13 @@ if [ -f "$(dirname "$0")/_/husky.sh" ]; then | |
fi | ||
fi | ||
|
||
# Show warning if Bodega/Task is still not registered/installed, else proceed with hook | ||
# Show warning if Task is still not registered/installed, else proceed with hook | ||
if ! type task > /dev/null; then | ||
.config/log warn 'Bodega `task` does not appear to be installed or is not registered in the `PATH` variable - please manually include it' | ||
.config/log info 'Get Bodega here -> `https://github.com/megabyte-labs/Bodega`' | ||
logger warn '`task` does not appear to be installed or is not registered in the `PATH` variable - please manually include it' | ||
logger info 'Get `task` here -> https://taskfile.dev' | ||
else | ||
task git:hook:pre-push -- "$1 $2" | ||
fi | ||
else | ||
.config/log warn 'Husky pre-commit hooks are currently not properly setup.' | ||
logger warn 'Husky pre-commit hooks are currently not properly setup.' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.