From 9a630a0440cfa8adb4555b87720362d5240f706f Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sun, 24 Jan 2021 16:57:23 +0200 Subject: [PATCH 1/3] Prevent accidental `cd` when loading app vars --- abra | 2 -- 1 file changed, 2 deletions(-) diff --git a/abra b/abra index 142fdf3..7a6cbe1 100755 --- a/abra +++ b/abra @@ -391,8 +391,6 @@ require_app_latest() { if [ "$abra___skip_update" = "false" ]; then (cd "$APP_DIR" && git pull > /dev/null 2>&1) - else - info "Skipping \`git pull\`" fi } From cef06a82a68e70d6a139b388ce1774d2eb1bff40 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Sun, 24 Jan 2021 18:48:24 +0200 Subject: [PATCH 2/3] =?UTF-8?q?abra-commands.sh=20=E2=86=92=20abra.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- abra | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/abra b/abra index 7a6cbe1..4eef435 100755 --- a/abra +++ b/abra @@ -402,10 +402,10 @@ fi ###### Run-time loading load_custom_commands() { - if [ -f abra-commands.sh ]; then + if [ -f abra.sh ]; then # shellcheck disable=SC1091 - source abra-commands.sh - info "Loading custom commands from abra-commands.sh" + source abra.sh + info "Loading custom commands from abra.sh" fi if [ -n "$abra__app_" ]; then @@ -414,10 +414,10 @@ load_custom_commands() { require_app_latest "$TYPE" fi - if [ -f "$APP_DIR/abra-commands.sh" ]; then - info "Loading custom commands from $APP_DIR/abra-commands.sh" + if [ -f "$APP_DIR/abra.sh" ]; then + info "Loading custom commands from $APP_DIR/abra.sh" # shellcheck disable=SC1090,SC1091 - source "$APP_DIR/abra-commands.sh" + source "$APP_DIR/abra.sh" fi } From d2cdb11fcc8ab40d45478013cfa432b52503a283 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Mon, 8 Feb 2021 13:43:39 +0200 Subject: [PATCH 3/3] Tweak INFO messages, update CHANGELOG --- CHANGELOG.md | 1 + abra | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77264f7..174d085 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Use `# length=x` comments to generate passwords with `pwgen` and drop `KEY`/`PASSWORD` logic ([#68](https://git.autonomic.zone/coop-cloud/abra/issues/68)) - Global `--skip-update|-U` / `--skip-check|-C` options to make things quicker ([37e8b00](https://git.autonomic.zone/coop-cloud/abra/commit/37e8b00)) - `app backup` and `app restore` commands; requires per-app definition ([#70](https://git.autonomic.zone/coop-cloud/abra/issues/70)) +- Rename per-type `abra-commands.sh` to `abra.sh`, and include config versions as type-level instead of app-level config ([#43](https://git.autonomic.zone/coop-cloud/abra/issues/43)) # abra 0.4.1 (2020-12-24) diff --git a/abra b/abra index 4eef435..3a44826 100755 --- a/abra +++ b/abra @@ -401,11 +401,11 @@ fi ###### Run-time loading -load_custom_commands() { +load_abra_sh() { if [ -f abra.sh ]; then # shellcheck disable=SC1091 source abra.sh - info "Loading custom commands from abra.sh" + info "Loading abra.sh" fi if [ -n "$abra__app_" ]; then @@ -415,7 +415,7 @@ load_custom_commands() { fi if [ -f "$APP_DIR/abra.sh" ]; then - info "Loading custom commands from $APP_DIR/abra.sh" + info "Loading $APP_DIR/abra.sh" # shellcheck disable=SC1090,SC1091 source "$APP_DIR/abra.sh" fi @@ -1486,7 +1486,7 @@ abra() { set +a fi - load_custom_commands + load_abra_sh # Search for sub_* functions, and check if any of them matches enabled # arguments (i.e. is a command and is specified)