From 15bdd1159967c1840b4e9d487b5bf7e98735f2d1 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 13:05:23 +0200 Subject: [PATCH 1/9] Jiggle README and add CHANGELOG --- CHANGELOG.md | 3 +++ README.md | 22 ++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..a8cbaa0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# abra 0.1.0 (2020-09-22) + +- Initial pre-alpha release diff --git a/README.md b/README.md index 6e774da..4293d05 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,26 @@ Docker stack magic 🎩🐇 -## Installing +## Install -`make install` +```sh +curl https://install.abra.autonomic.zone | bash +``` + +Specific releases are available via the project [release page](https://git.autonomic.zone/autonomic-cooperative/abra/releases). + +## Changes + +See [CHANGELOG.md](./CHANGELOG.md). ## Hacking -`make dev_install` +```sh +git clone ssh://git@git.autonomic.zone:2222/autonomic-cooperative/abra.git +cd abra +make dev_install +``` ## Examples -``` -abra run mariadb mysqldump gitea -p'GdIbMeS09SURRktBnm3jcTufsL5z0MPd' | gzip > ../git.autonomic.zone_mariadb_`date +%F`.sql.gz -``` +- `abra run mariadb mysqldump gitea -p'GdIbMeS09SURRktBnm3jcTufsL5z0MPd' | gzip > ../git.autonomic.zone_mariadb_`date +%F`.sql.gz` From e2e1e07803d48600b939068795646b798909d9a1 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 13:37:33 +0200 Subject: [PATCH 2/9] Add installer script (first stab) --- CHANGELOG.md | 4 ++++ installer | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 installer diff --git a/CHANGELOG.md b/CHANGELOG.md index a8cbaa0..e65cbc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# abra 0.1.1 (2020-09-22) + +- Add installer script ([#9](https://git.autonomic.zone/autonomic-cooperative/abra/issues/9)) + # abra 0.1.0 (2020-09-22) - Initial pre-alpha release diff --git a/installer b/installer new file mode 100755 index 0000000..2b7d495 --- /dev/null +++ b/installer @@ -0,0 +1,18 @@ +#!/bin/bash + +ABRA_VERSION="0.1.0" +ABRA_SRC="https://git.autonomic.zone/autonomic-cooperative/abra/raw/tag/$ABRA_VERSION/abra" + +function install_abra { + mkdir -p "$HOME/.local/bin" + curl "$ABRA_SRC" > "$HOME/.local/bin/abra" + chmod +x "$HOME/.local/bin/abra" + echo "abra installed to $HOME/.loca/bin/abra" +} + +function run_installation { + install_abra +} + +run_installation +exit 0 From 32cef2af6812946b1eeef75fc371127e6646ea59 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 13:55:26 +0200 Subject: [PATCH 3/9] Add interactive flags for future --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4293d05..4d43995 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Docker stack magic 🎩🐇 ## Install ```sh -curl https://install.abra.autonomic.zone | bash +curl -fsSL https://install.abra.autonomic.zone | bash ``` Specific releases are available via the project [release page](https://git.autonomic.zone/autonomic-cooperative/abra/releases). From 9660f32b8439fa171a04f06d0fd4aadf68a686da Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 13:55:44 +0200 Subject: [PATCH 4/9] Check also the installer script --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index e0dd144..9c52b22 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: commands: - apt update - apt install -y shellcheck - - shellcheck abra + - shellcheck abra installer trigger: branch: - main From e052aa2b27d1ceec408cde2be22d270c2a476e81 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 13:58:17 +0200 Subject: [PATCH 5/9] Add note about installer scripts repo --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4d43995..3e478d3 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ cd abra make dev_install ``` +See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. + ## Examples - `abra run mariadb mysqldump gitea -p'GdIbMeS09SURRktBnm3jcTufsL5z0MPd' | gzip > ../git.autonomic.zone_mariadb_`date +%F`.sql.gz` From 3d47cf97c04a0002ecb34d28c7dd4ff15cc37998 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 14:02:59 +0200 Subject: [PATCH 6/9] Update notes about installer and tags --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e478d3..f32300e 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ cd abra make dev_install ``` -See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. +See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. To make a release, just add an entry to [CHANGELOG.md](./CHANGELOG.md) (following [semver](https://semver.org/) please) and then `git tag x.x.x && git push origin main --tags`. If you want the installer scripts to pick that up, you'll need to change the version number in the [Makefile](https://git.autonomic.zone/autonomic-cooperative/installer-scripts/src/branch/main/Makefile) and run `make` in that repository and push the changes. ## Examples From a065f5f2a69938b8cca269bf0af0dc14657e07a9 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 14:17:12 +0200 Subject: [PATCH 7/9] Rough and ready upgrading --- abra | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/abra b/abra index ea1567e..7f02436 100755 --- a/abra +++ b/abra @@ -62,6 +62,7 @@ sub_help() { echo " run SERVICE CMD run a command in the specified service's container" echo " run_args SERVICE ARGS CMD run, passing extra args to docker exec" echo " secret_generate SECRET VERSION [CMD] generate a secret, store it in pass & as a Docker secret" + echo " upgrade upgrade to the latest version" echo " ... (custom commands)" echo "" echo "Make sure \$STACK_NAME is set using direnv or -a" @@ -237,6 +238,10 @@ sub_context_use() { docker context use "$1" } +sub_upgrade() { + curl -fsSL https://install.abra.autonomic.zone | bash +} + sub_context() { SUBCOMMAND2=$1 shift From 3a1f4e7bf64246868c7fce6cbbde20b11c5af70c Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 14:18:41 +0200 Subject: [PATCH 8/9] Bump to next version --- CHANGELOG.md | 4 ++++ README.md | 2 +- installer | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e65cbc3..aaa9e21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# abra 0.1.2 (2020-09-22) + +- Add upgrade command ([#10](https://git.autonomic.zone/autonomic-cooperative/abra/issues/10)) + # abra 0.1.1 (2020-09-22) - Add installer script ([#9](https://git.autonomic.zone/autonomic-cooperative/abra/issues/9)) diff --git a/README.md b/README.md index f32300e..ffffb97 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ cd abra make dev_install ``` -See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. To make a release, just add an entry to [CHANGELOG.md](./CHANGELOG.md) (following [semver](https://semver.org/) please) and then `git tag x.x.x && git push origin main --tags`. If you want the installer scripts to pick that up, you'll need to change the version number in the [Makefile](https://git.autonomic.zone/autonomic-cooperative/installer-scripts/src/branch/main/Makefile) and run `make` in that repository and push the changes. +See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. To make a release, just add an entry to [CHANGELOG.md](./CHANGELOG.md) and the [installer](./installer) (following [semver](https://semver.org/) please) and then `git tag x.x.x && git push origin main --tags`. If you want the installer scripts to pick that up, you'll need to change the version number in the [Makefile](https://git.autonomic.zone/autonomic-cooperative/installer-scripts/src/branch/main/Makefile) and run `make` in that repository and push the changes. ## Examples diff --git a/installer b/installer index 2b7d495..c4ceb08 100755 --- a/installer +++ b/installer @@ -1,6 +1,6 @@ #!/bin/bash -ABRA_VERSION="0.1.0" +ABRA_VERSION="0.1.2" ABRA_SRC="https://git.autonomic.zone/autonomic-cooperative/abra/raw/tag/$ABRA_VERSION/abra" function install_abra { From 8a19bb059c0c9504e0ae0d6dcf55d16c61cb7965 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 22 Sep 2020 15:00:23 +0200 Subject: [PATCH 9/9] Clarify repo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffffb97..3550a4d 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ cd abra make dev_install ``` -See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. To make a release, just add an entry to [CHANGELOG.md](./CHANGELOG.md) and the [installer](./installer) (following [semver](https://semver.org/) please) and then `git tag x.x.x && git push origin main --tags`. If you want the installer scripts to pick that up, you'll need to change the version number in the [Makefile](https://git.autonomic.zone/autonomic-cooperative/installer-scripts/src/branch/main/Makefile) and run `make` in that repository and push the changes. +See [autonomic-cooperative/installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) for the installer script deployment. To make a release, just add an entry to [CHANGELOG.md](./CHANGELOG.md) and the [installer](./installer) (following [semver](https://semver.org/) please) and then `git tag x.x.x && git push origin main --tags`. If you want the [installer-scripts](https://git.autonomic.zone/autonomic-cooperative/installer-scripts) deployment to pick that up, you'll need to change the version number in the [Makefile](https://git.autonomic.zone/autonomic-cooperative/installer-scripts/src/branch/main/Makefile) and run `make` in that repository and push the changes. ## Examples