Remove abra.yml / yq stuff for now
This commit is contained in:
parent
37c59a53ef
commit
07d4f8cbdf
31
abra
31
abra
@ -220,20 +220,6 @@ PROGRAM_NAME=$(basename "$0")
|
||||
|
||||
###### Utility functions
|
||||
|
||||
yml_pattern_exists() {
|
||||
PATTERN=$1
|
||||
|
||||
if [ -f "$ABRA_CONFIG" ]; then
|
||||
RESULT=$(yq read "$ABRA_CONFIG" "$PATTERN")
|
||||
|
||||
if [ "$RESULT" != 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
error() {
|
||||
echo "$(tput setaf 1)ERROR: $*$(tput sgr0)"
|
||||
exit 1
|
||||
@ -259,12 +245,6 @@ fi
|
||||
|
||||
###### Safety checks
|
||||
|
||||
require_yq() {
|
||||
if ! type yq > /dev/null 2>&1; then
|
||||
error "yq program is not installed"
|
||||
fi
|
||||
}
|
||||
|
||||
require_multitail() {
|
||||
if ! type multitail > /dev/null 2>&1; then
|
||||
error "multitail program is not installed"
|
||||
@ -273,7 +253,7 @@ require_multitail() {
|
||||
|
||||
require_stack() {
|
||||
if [ -z "$STACK_NAME" ]; then
|
||||
error "no stack_name, export \$STACK_NAME=my_cool_app or add it to abra.yml"
|
||||
error "no stack_name, export \$STACK_NAME=my_cool_app"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -584,15 +564,6 @@ abra() {
|
||||
source "$abra___env" || error "Unable to load env from '$abra___env'"
|
||||
fi
|
||||
|
||||
if [ -n "$abra___config" ]; then
|
||||
require_yq
|
||||
|
||||
if yml_pattern_exists stack_name; then
|
||||
STACK_NAME=$(yq read "$ABRA_CONFIG" stack_name)
|
||||
fi
|
||||
# FIXME load other variables somehow
|
||||
fi
|
||||
|
||||
load_custom_commands
|
||||
|
||||
# Search for sub_* functions, and check if any of them matches enabled
|
||||
|
Reference in New Issue
Block a user