From 8a65d7c1cd9e3e07315159ae1aa922f6cad86cb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 15:58:01 +0000 Subject: [PATCH 01/13] chore(deps): bump redis from 7.0.12 to 7.2.0 Bumps redis from 7.0.12 to 7.2.0. --- updated-dependencies: - dependency-name: redis dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index dcc9ca6..43d59e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM redis:7.0.12 +FROM redis:7.2.0 From 9a95ed8299ded79f6b7e3b07ce7efd21b315b001 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 17 Aug 2023 19:57:06 -0400 Subject: [PATCH 02/13] Release 1.36.0 --- README.md | 2 +- plugin.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4f2f34e..f9d9de1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dokku redis [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-redis/ci.yml?branch=master&style=flat-square "Build Status")](https://github.com/dokku/dokku-redis/actions/workflows/ci.yml?query=branch%3Amaster) [![IRC Network](https://img.shields.io/badge/irc-libera-blue.svg?style=flat-square "IRC Libera")](https://webchat.libera.chat/?channels=dokku) -Official redis plugin for dokku. Currently defaults to installing [redis 7.0.12](https://hub.docker.com/_/redis/). +Official redis plugin for dokku. Currently defaults to installing [redis 7.2.0](https://hub.docker.com/_/redis/). ## Requirements diff --git a/plugin.toml b/plugin.toml index a48bf43..3406dae 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku redis service plugin" -version = "1.35.0" +version = "1.36.0" [plugin.config] From 648d1370076e039497573f6453f141688d325064 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 6 Sep 2023 22:37:22 -0400 Subject: [PATCH 03/13] feat: upgrade test suite from ubuntu 20.04 to 22.04 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/tagged-release.yml | 2 +- Makefile | 2 +- Vagrantfile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06f39ab..3e5bd0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ concurrency: jobs: unit-tests-master: name: unit-tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: DOKKU_VERSION: master @@ -59,7 +59,7 @@ jobs: unit-tests-0_19_0: name: unit-tests-0.19.0 - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: DOKKU_TAG: v0.19.0 diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index 846c457..0d7a4fb 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -10,7 +10,7 @@ on: jobs: tagged-release: name: tagged-release - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: "marvinpinto/action-automatic-releases@v1.2.1" diff --git a/Makefile b/Makefile index 863c1ba..a4ece21 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ ifneq ($(shell shellcheck --version >/dev/null 2>&1 ; echo $$?),0) ifeq ($(SYSTEM_NAME),darwin) brew install shellcheck else - sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' + sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse' sudo rm -rf /var/lib/apt/lists/* && sudo apt-get clean sudo apt-get update -qq && sudo apt-get install -qq -y shellcheck endif diff --git a/Vagrantfile b/Vagrantfile index 4aec135..093340f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,7 +1,7 @@ # -*- mode: ruby -*- # vi: set ft=ruby : -BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-20.04" +BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-22.04" BOX_MEMORY = ENV["BOX_MEMORY"] || "2048" DOKKU_VERSION = "master" From 1e2125c80026a064eb2f7293ef2fa4ee575f7a7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 02:55:29 +0000 Subject: [PATCH 04/13] chore(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e5bd0b..e65a6fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: DOKKU_VERSION: master steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -64,7 +64,7 @@ jobs: DOKKU_TAG: v0.19.0 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 From c4a7504881da5fb776c2bb9e329985c4813e6c35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:38:16 +0000 Subject: [PATCH 05/13] chore(deps): bump redis from 7.2.0 to 7.2.1 Bumps redis from 7.2.0 to 7.2.1. --- updated-dependencies: - dependency-name: redis dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 43d59e6..7d2900d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM redis:7.2.0 +FROM redis:7.2.1 From c5139b9169639ec599b728ada2218b1fc655b0e2 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 9 Sep 2023 22:40:00 -0400 Subject: [PATCH 06/13] Release 1.37.0 --- plugin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.toml b/plugin.toml index 3406dae..7ac0095 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku redis service plugin" -version = "1.36.0" +version = "1.37.0" [plugin.config] From 2c2042535a1523d1bf9b3012e1d5cc24f52079ec Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 9 Sep 2023 22:41:22 -0400 Subject: [PATCH 07/13] Release 1.37.1 --- README.md | 2 +- plugin.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f9d9de1..b8d1b63 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dokku redis [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-redis/ci.yml?branch=master&style=flat-square "Build Status")](https://github.com/dokku/dokku-redis/actions/workflows/ci.yml?query=branch%3Amaster) [![IRC Network](https://img.shields.io/badge/irc-libera-blue.svg?style=flat-square "IRC Libera")](https://webchat.libera.chat/?channels=dokku) -Official redis plugin for dokku. Currently defaults to installing [redis 7.2.0](https://hub.docker.com/_/redis/). +Official redis plugin for dokku. Currently defaults to installing [redis 7.2.1](https://hub.docker.com/_/redis/). ## Requirements diff --git a/plugin.toml b/plugin.toml index 7ac0095..258f312 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku redis service plugin" -version = "1.37.0" +version = "1.37.1" [plugin.config] From 61ed70c5df5b0dd7435ce8bab99a9eb011539de3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:06:59 +0000 Subject: [PATCH 08/13] chore(deps): bump redis from 7.2.1 to 7.2.3 Bumps redis from 7.2.1 to 7.2.3. --- updated-dependencies: - dependency-name: redis dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7d2900d..8a04a33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1 @@ -FROM redis:7.2.1 +FROM redis:7.2.3 From ea92f11ab65abd4a3d885031098e20393616ea0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:16:41 +0000 Subject: [PATCH 09/13] chore(deps): bump actions/setup-python from 4 to 5 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e65a6fd..56c413a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.7.x' @@ -68,7 +68,7 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.7.x' From 0d75a8e46fab1e7d2c94042fe85ee2f47a47f07a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 9 Dec 2023 13:48:37 -0500 Subject: [PATCH 10/13] chore: fix typo --- README.md | 18 +++++++++--------- subcommands/clone | 4 ++-- subcommands/create | 4 ++-- subcommands/upgrade | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index b8d1b63..ff6d478 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,9 @@ flags: - `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited) - `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to - `-p|--password PASSWORD`: override the user-level service password -- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation +- `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation - `-r|--root-password PASSWORD`: override the root-level service password -- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start +- `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start - `-s|--shm-size SHM_SIZE`: override shared memory size for redis docker container Create a redis service named lollipop: @@ -85,7 +85,7 @@ Create a redis service named lollipop: dokku redis:create lollipop ``` -You can also specify the image and image version to use for the service. It *must* be compatible with the redis image. +You can also specify the image and image version to use for the service. It _must_ be compatible with the redis image. ```shell export REDIS_IMAGE="redis" @@ -151,7 +151,7 @@ dokku redis:info lollipop --version ```shell # usage -dokku redis:list +dokku redis:list ``` List all services: @@ -457,9 +457,9 @@ flags: - `-i|--image IMAGE`: the image name to start the service with - `-I|--image-version IMAGE_VERSION`: the image version to start the service with - `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to -- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation +- `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation - `-R|--restart-apps "true"`: whether or not to force an app restart (default: false) -- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start +- `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start - `-s|--shm-size SHM_SIZE`: override shared memory size for redis docker container You can upgrade an existing service to a new image or image-version: @@ -501,9 +501,9 @@ flags: - `-m|--memory MEMORY`: container memory limit in megabytes (default: unlimited) - `-N|--initial-network INITIAL_NETWORK`: the initial network to attach the service to - `-p|--password PASSWORD`: override the user-level service password -- `-P|--post-create-network NETWORKS`: a comman-separated list of networks to attach the service container to after service creation +- `-P|--post-create-network NETWORKS`: a comma-separated list of networks to attach the service container to after service creation - `-r|--root-password PASSWORD`: override the root-level service password -- `-S|--post-start-network NETWORKS`: a comman-separated list of networks to attach the service container to after service start +- `-S|--post-start-network NETWORKS`: a comma-separated list of networks to attach the service container to after service start - `-s|--shm-size SHM_SIZE`: override shared memory size for redis docker container You can clone an existing service to a new one: @@ -701,7 +701,7 @@ flags: Schedule a backup: -> 'schedule' is a crontab expression, eg. "0 3 * * *" for each day at 3am +> 'schedule' is a crontab expression, eg. "0 3 \* \* \*" for each day at 3am ```shell dokku redis:backup-schedule lollipop "0 3 * * *" my-s3-bucket diff --git a/subcommands/clone b/subcommands/clone index eb10519..b9d99a3 100755 --- a/subcommands/clone +++ b/subcommands/clone @@ -17,9 +17,9 @@ service-clone-cmd() { #F -m|--memory MEMORY, container memory limit in megabytes (default: unlimited) #F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to #F -p|--password PASSWORD, override the user-level service password - #F -P|--post-create-network NETWORKS, a comman-separated list of networks to attach the service container to after service creation + #F -P|--post-create-network NETWORKS, a comma-separated list of networks to attach the service container to after service creation #F -r|--root-password PASSWORD, override the root-level service password - #F -S|--post-start-network NETWORKS, a comman-separated list of networks to attach the service container to after service start + #F -S|--post-start-network NETWORKS, a comma-separated list of networks to attach the service container to after service start #F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container declare desc="create container then copy data from into " local cmd="$PLUGIN_COMMAND_PREFIX:clone" argv=("$@") diff --git a/subcommands/create b/subcommands/create index 87135e5..1192b59 100755 --- a/subcommands/create +++ b/subcommands/create @@ -25,9 +25,9 @@ service-create-cmd() { #F -m|--memory MEMORY, container memory limit in megabytes (default: unlimited) #F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to #F -p|--password PASSWORD, override the user-level service password - #F -P|--post-create-network NETWORKS, a comman-separated list of networks to attach the service container to after service creation + #F -P|--post-create-network NETWORKS, a comma-separated list of networks to attach the service container to after service creation #F -r|--root-password PASSWORD, override the root-level service password - #F -S|--post-start-network NETWORKS, a comman-separated list of networks to attach the service container to after service start + #F -S|--post-start-network NETWORKS, a comma-separated list of networks to attach the service container to after service start #F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container declare desc="create a $PLUGIN_SERVICE service" local cmd="$PLUGIN_COMMAND_PREFIX:create" argv=("$@") diff --git a/subcommands/upgrade b/subcommands/upgrade index 93352c1..3eeccde 100755 --- a/subcommands/upgrade +++ b/subcommands/upgrade @@ -15,9 +15,9 @@ service-upgrade-cmd() { #F -i|--image IMAGE, the image name to start the service with #F -I|--image-version IMAGE_VERSION, the image version to start the service with #F -N|--initial-network INITIAL_NETWORK, the initial network to attach the service to - #F -P|--post-create-network NETWORKS, a comman-separated list of networks to attach the service container to after service creation + #F -P|--post-create-network NETWORKS, a comma-separated list of networks to attach the service container to after service creation #F -R|--restart-apps "true", whether or not to force an app restart (default: false) - #F -S|--post-start-network NETWORKS, a comman-separated list of networks to attach the service container to after service start + #F -S|--post-start-network NETWORKS, a comma-separated list of networks to attach the service container to after service start #F -s|--shm-size SHM_SIZE, override shared memory size for $PLUGIN_COMMAND_PREFIX docker container declare desc="upgrade service to the specified versions" local cmd="$PLUGIN_COMMAND_PREFIX:upgrade" argv=("$@") From 99c812fc2f8083d4b6bcfb51de2b5d25621ca06b Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 9 Dec 2023 13:51:12 -0500 Subject: [PATCH 11/13] chore: fix typo --- README.md | 2 +- subcommands/create | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff6d478..236a581 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ export REDIS_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}" dokku redis:create lollipop ``` -You can also specify custom environment variables to start the redis service in semi-colon separated form. +You can also specify custom environment variables to start the redis service in semicolon-separated form. ```shell export REDIS_CUSTOM_ENV="USER=alpha;HOST=beta" diff --git a/subcommands/create b/subcommands/create index 1192b59..7112f18 100755 --- a/subcommands/create +++ b/subcommands/create @@ -14,7 +14,7 @@ service-create-cmd() { #E export ${PLUGIN_VARIABLE}_IMAGE_VERSION="${PLUGIN_IMAGE_VERSION}" #E dokku $PLUGIN_COMMAND_PREFIX:create lollipop #E you can also specify custom environment variables to start - #E the ${PLUGIN_COMMAND_PREFIX} service in semi-colon separated form. + #E the ${PLUGIN_COMMAND_PREFIX} service in semicolon-separated form. #E export ${PLUGIN_VARIABLE}_CUSTOM_ENV="USER=alpha;HOST=beta" #E dokku $PLUGIN_COMMAND_PREFIX:create lollipop #A service, service to run command against From a30dd2e7277939dc9d9bd87d5951752ec6b38a9a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 9 Dec 2023 23:55:46 -0500 Subject: [PATCH 12/13] docs: update docs and generation script --- README.md | 6 +- bin/generate | 222 +++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 182 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 236a581..d12d835 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # dokku redis [![Build Status](https://img.shields.io/github/actions/workflow/status/dokku/dokku-redis/ci.yml?branch=master&style=flat-square "Build Status")](https://github.com/dokku/dokku-redis/actions/workflows/ci.yml?query=branch%3Amaster) [![IRC Network](https://img.shields.io/badge/irc-libera-blue.svg?style=flat-square "IRC Libera")](https://webchat.libera.chat/?channels=dokku) -Official redis plugin for dokku. Currently defaults to installing [redis 7.2.1](https://hub.docker.com/_/redis/). +Official redis plugin for dokku. Currently defaults to installing [redis 7.2.3](https://hub.docker.com/_/redis/). ## Requirements @@ -85,7 +85,7 @@ Create a redis service named lollipop: dokku redis:create lollipop ``` -You can also specify the image and image version to use for the service. It _must_ be compatible with the redis image. +You can also specify the image and image version to use for the service. It *must* be compatible with the redis image. ```shell export REDIS_IMAGE="redis" @@ -701,7 +701,7 @@ flags: Schedule a backup: -> 'schedule' is a crontab expression, eg. "0 3 \* \* \*" for each day at 3am +> 'schedule' is a crontab expression, eg. "0 3 * * *" for each day at 3am ```shell dokku redis:backup-schedule lollipop "0 3 * * *" my-s3-bucket diff --git a/bin/generate b/bin/generate index 89b9999..f4f14e7 100755 --- a/bin/generate +++ b/bin/generate @@ -1,15 +1,30 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function + import os import re -def compile(service, version, variable, alias, image, scheme, ports, sponsors, options, unimplemented, dokku_version): - prefix = "\n\n".join([ - header(service), - description(service, image, version), - ]) +def compile( + service, + version, + variable, + alias, + image, + scheme, + ports, + sponsors, + options, + unimplemented, + dokku_version, +): + prefix = "\n\n".join( + [ + header(service), + description(service, image, version), + ] + ) if len(sponsors) > 0: prefix += "\n\n" @@ -21,8 +36,19 @@ def compile(service, version, variable, alias, image, scheme, ports, sponsors, o prefix, requirements_section(dokku_version), installation_section(service, dokku_version), - commands_section(service, variable, alias, image, scheme, ports, unimplemented), - usage_section(service, variable, alias, image, scheme, ports, options, unimplemented), + commands_section( + service, variable, alias, image, scheme, ports, unimplemented + ), + usage_section( + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + ), ] ) .replace("\n\n\n\n\n", "\n") @@ -55,17 +81,25 @@ def sponsors_section(service, sponsors): if len(sponsors) == 0: return "" - sponsor_data = ["## Sponsors", "", f"The {service} plugin was generously sponsored by the following:", ""] + sponsor_data = [ + "## Sponsors", + "", + f"The {service} plugin was generously sponsored by the following:", + "", + ] sponsor_data.extend([f"- [{s}](https://github.com/{s})" for s in sponsors]) - return "\n".join( - sponsor_data - ) + return "\n".join(sponsor_data) def requirements_section(dokku_version): return "\n".join( - ["## Requirements", "", f"- dokku {dokku_version}", "- docker 1.8.x",] + [ + "## Requirements", + "", + f"- dokku {dokku_version}", + "- docker 1.8.x", + ] ) @@ -115,17 +149,31 @@ def commands_section(service, variable, alias, image, scheme, ports, unimplement return "\n".join(content) -def usage_section(service, variable, alias, image, scheme, ports, options, unimplemented): +def usage_section( + service, variable, alias, image, scheme, ports, options, unimplemented +): return "\n\n".join( [ "## Usage", f"Help for any commands can be displayed by specifying the command as an argument to {service}:help. Plugin help output in conjunction with any files in the `docs/` folder is used to generate the plugin documentation. Please consult the `{service}:help` command for any undocumented commands.", - usage_intro(service, variable, alias, image, scheme, ports, options, unimplemented), - usage_lifecycle(service, variable, alias, image, scheme, ports, options, unimplemented), - usage_automation(service, variable, alias, image, scheme, ports, options, unimplemented), - usage_data_management(service, variable, alias, image, scheme, ports, options, unimplemented), - usage_backup(service, variable, alias, image, scheme, ports, options, unimplemented), - usage_docker_pull(service, variable, alias, image, scheme, ports, options, unimplemented), + usage_intro( + service, variable, alias, image, scheme, ports, options, unimplemented + ), + usage_lifecycle( + service, variable, alias, image, scheme, ports, options, unimplemented + ), + usage_automation( + service, variable, alias, image, scheme, ports, options, unimplemented + ), + usage_data_management( + service, variable, alias, image, scheme, ports, options, unimplemented + ), + usage_backup( + service, variable, alias, image, scheme, ports, options, unimplemented + ), + usage_docker_pull( + service, variable, alias, image, scheme, ports, options, unimplemented + ), ] ) @@ -135,11 +183,22 @@ def usage_intro(service, variable, alias, image, scheme, ports, options, unimple content = ["### Basic Usage"] return fetch_commands_content( - service, variable, alias, image, scheme, ports, options, unimplemented, commands, content + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + commands, + content, ) -def usage_lifecycle(service, variable, alias, image, scheme, ports, options, unimplemented): +def usage_lifecycle( + service, variable, alias, image, scheme, ports, options, unimplemented +): commands = [ "connect", "enter", @@ -160,11 +219,22 @@ def usage_lifecycle(service, variable, alias, image, scheme, ports, options, uni ] return fetch_commands_content( - service, variable, alias, image, scheme, ports, options, unimplemented, commands, content + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + commands, + content, ) -def usage_automation(service, variable, alias, image, scheme, ports, options, unimplemented): +def usage_automation( + service, variable, alias, image, scheme, ports, options, unimplemented +): commands = ["app-links", "clone", "exists", "linked", "links"] content = [ "### Service Automation", @@ -174,11 +244,22 @@ def usage_automation(service, variable, alias, image, scheme, ports, options, un ] return fetch_commands_content( - service, variable, alias, image, scheme, ports, options, unimplemented, commands, content + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + commands, + content, ) -def usage_data_management(service, variable, alias, image, scheme, ports, options, unimplemented): +def usage_data_management( + service, variable, alias, image, scheme, ports, options, unimplemented +): commands = ["import", "export"] content = [ "### Data Management", @@ -188,11 +269,22 @@ def usage_data_management(service, variable, alias, image, scheme, ports, option ] return fetch_commands_content( - service, variable, alias, image, scheme, ports, options, unimplemented, commands, content + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + commands, + content, ) -def usage_backup(service, variable, alias, image, scheme, ports, options, unimplemented): +def usage_backup( + service, variable, alias, image, scheme, ports, options, unimplemented +): commands = [ "backup-auth", "backup-deauth", @@ -215,11 +307,22 @@ def usage_backup(service, variable, alias, image, scheme, ports, options, unimpl ] return fetch_commands_content( - service, variable, alias, image, scheme, ports, options, unimplemented, commands, content + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + commands, + content, ) -def usage_docker_pull(service, variable, alias, image, scheme, ports, options, unimplemented): +def usage_docker_pull( + service, variable, alias, image, scheme, ports, options, unimplemented +): service_prefix = service.upper() return "\n".join( [ @@ -233,11 +336,30 @@ def usage_docker_pull(service, variable, alias, image, scheme, ports, options, u def fetch_commands_content( - service, variable, alias, image, scheme, ports, options, unimplemented, commands, content + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + commands, + content, ): i = 0 for command in commands: - output = command_help(command, service, variable, alias, image, scheme, ports, options, unimplemented) + output = command_help( + command, + service, + variable, + alias, + image, + scheme, + ports, + options, + unimplemented, + ) if output == "": continue content.append(output) @@ -275,7 +397,9 @@ def parse_args(line): return " ".join(arguments) -def command_help(command, service, variable, alias, image, scheme, ports, options, unimplemented): +def command_help( + command, service, variable, alias, image, scheme, ports, options, unimplemented +): if command in unimplemented: return "" @@ -285,7 +409,7 @@ def command_help(command, service, variable, alias, image, scheme, ports, option "", "```shell", "# usage", - f"dokku {service}:{command} {data['arguments_string']}", + f"dokku {service}:{command} {data['arguments_string']}".strip(), "```", ] @@ -442,11 +566,11 @@ def process_sentence(sentence_lines): parts = [] for word in sentence.strip().split(" "): if word.isupper() and len(word) > 1: - for ending in [':', '.']: + for ending in [":", "."]: if word.endswith(ending): - word = '`{0}`{1}'.format(word[:-1], ending) + word = "`{0}`{1}".format(word[:-1], ending) else: - word = '`{0}`'.format(word) + word = "`{0}`".format(word) parts.append(word) text.append(" ".join(parts)) @@ -491,10 +615,10 @@ def main(): with open("Dockerfile") as f: for line in f.readlines(): - if "FROM " in line: - image, version = line.split(" ")[1].split(":") - image = image.strip() - version = version.strip() + if "FROM " in line: + image, version = line.split(" ")[1].split(":") + image = image.strip() + version = version.strip() with open("config") as f: for line in f.readlines(): @@ -524,10 +648,22 @@ def main(): with open("plugin.toml") as f: for line in f.readlines(): if line.startswith("sponsors"): - sponsors = re.search("\[([\"\w\s,_-]+)\]", line).group(1) - sponsors = [s.strip("\"") for s in sponsors.split(",")] + sponsors = re.search('\[(["\w\s,_-]+)\]', line).group(1) + sponsors = [s.strip('"') for s in sponsors.split(",")] - text = compile(service, version, variable, alias, image, scheme, ports, sponsors, options, unimplemented, "0.19.x+") + text = compile( + service, + version, + variable, + alias, + image, + scheme, + ports, + sponsors, + options, + unimplemented, + "0.19.x+", + ) base_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) readme_file = os.path.join(base_path, "README.md") From 78a1cb36eddeed24509bee3efda6ea0181705c19 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 9 Dec 2023 23:56:16 -0500 Subject: [PATCH 13/13] Release 1.37.2 --- plugin.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.toml b/plugin.toml index 258f312..401fd1c 100644 --- a/plugin.toml +++ b/plugin.toml @@ -1,4 +1,4 @@ [plugin] description = "dokku redis service plugin" -version = "1.37.1" +version = "1.37.2" [plugin.config]