From 66ecc59aeb345efc3121f64c6bac739af5a42dbe Mon Sep 17 00:00:00 2001 From: Kyle Stevenson Date: Mon, 26 Oct 2026 13:30:05 +0000 Subject: [PATCH 1/6] replace the readme with markdown covering every tool --- README.md | 40 +++++++++++++++++++++++++ README.rst | 71 --------------------------------------------- docs/development.md | 17 +++++++++++ 3 files changed, 57 insertions(+), 71 deletions(-) create mode 100644 README.md delete mode 100644 README.rst create mode 100644 docs/development.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe63a80 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# The Developer Society - Development Tools + +Tools for making development at The Developer Society quicker, easier and less error prone. + +## Installation + +Clone the repo: + +```console +$ git clone git@github.com:developersociety/tools.git +``` + +Then add its `bin` directory to your `$PATH`, by adding this to your `~/.zshrc`: + +```bash +export PATH="/path/to/tools/bin:$PATH" +``` + +To update the tools later, `git pull` in the checkout. + +## Usage + +Every tool takes `--help`, which prints its usage and what it does: + +```console +$ dev-clone --help +``` + +| Command | What it does | Needs | +|-------------------------|-----------------------------------------------------|---------------------------------| +| `dev-clone` | Clone a repo and set up virtualenvwrapper for it | virtualenvwrapper, pyenv | +| `dev-clean-branches` | Delete merged local branches and prune remotes | | +| `dev-wipeenv` | Uninstall every package in the active virtualenv | | +| `dev-tofu` | Run tofu with the devsoc-tofu AWS profile | aws-vault, opentofu | +| `dev-aws-login` | Open the AWS console via aws-vault | aws-vault | +| `dev-update-aws-config` | Rewrite `~/.aws/config` from the 1Password template | 1Password CLI (`op`) | +| `dev-unlock-server` | Unlock the encrypted root filesystem on a server | 1Password CLI (`op`) | +| `dev-archive-repo` | Mirror a repo to the archive server | | + +To work on the tools themselves, see [docs/development.md](docs/development.md). diff --git a/README.rst b/README.rst deleted file mode 100644 index dabae77..0000000 --- a/README.rst +++ /dev/null @@ -1,71 +0,0 @@ -========================================= -The Developer Society - Development Tools -========================================= - -Tools for making development at The Developer Society quicker, easier and less error prone. - -https://github.com/developersociety/tools - -Installation -============ - -To install these tools: - -.. code:: console - - $ git clone git@github.com:developersociety/tools.git - $ cd tools/bin - $ pwd - -Add the bin directory to your ``$PATH``, by editing your ``~/.bash_profile``: - -.. code:: bash - - export PATH="/path/to/tools/bin:$PATH" - - -Usage -===== - -dev-clone ---------- - -This tool will `git-clone` a repo from Dev's github and setup virtualenvwrapper for you, with a -virtualenv and a virtualenvwrapper project for you. - -It requires virtualenvwrapper to be installed with the `$PROJECT_HOME` environment variable set -correctly. - -It will: - -* `git-clone` the repo from Dev's github -* setup virtualenv with virtualenvwrapper -* setup virtualenvwrapper project dir - -Example of use: -~~~~~~~~~~~~~~~ - -.. code-block:: console - - $ dev-clone devsoc - - -dev-wipeenv ------------ - -Removes all packages in the current virtualenv. - -Example of use: -~~~~~~~~~~~~~~~ - -.. code-block:: console - - $ dev-wipeenv - - -Development -=========== - -Please contribute! If you find yourself needing to do the same thing over and over, or you keep -forgetting a process, or you just feel you're typing too much to do boring stuff... then create a -script to automate/help/optimise it. And then we can all benefit. diff --git a/docs/development.md b/docs/development.md new file mode 100644 index 0000000..1803b26 --- /dev/null +++ b/docs/development.md @@ -0,0 +1,17 @@ +# Development + +Please contribute! If you find yourself needing to do the same thing over and over, or you keep +forgetting a process, or you just feel you're typing too much to do boring stuff... then create a +script to automate/help/optimise it. And then we can all benefit. + +## Tooling + +The scripts are checked with shellcheck and formatted with shfmt: + +```console +$ make install-local +$ make format +$ make lint +``` + +`make lint` is also what CI runs on every push. From 3644a0b5426448007f45a38fb126e7e010b4955b Mon Sep 17 00:00:00 2001 From: Kyle Stevenson Date: Mon, 26 Oct 2026 13:30:05 +0000 Subject: [PATCH 2/6] run make lint in ci --- .github/workflows/lint.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..fd0ca73 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: lint + +on: + push: + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # shellcheck comes with the runner image, but shfmt doesn't. + - name: Install shfmt + run: | + go install mvdan.cc/sh/v3/cmd/shfmt@v3.14.1 + echo "$HOME/go/bin" >> "$GITHUB_PATH" + - run: make lint From fa09b2d361c152d6fc690549125e7a8e1f2ecb19 Mon Sep 17 00:00:00 2001 From: Kyle Stevenson Date: Mon, 26 Oct 2026 13:34:24 +0000 Subject: [PATCH 3/6] drop the development doc --- README.md | 2 -- docs/development.md | 17 ----------------- 2 files changed, 19 deletions(-) delete mode 100644 docs/development.md diff --git a/README.md b/README.md index fe63a80..6ddc06d 100644 --- a/README.md +++ b/README.md @@ -36,5 +36,3 @@ $ dev-clone --help | `dev-update-aws-config` | Rewrite `~/.aws/config` from the 1Password template | 1Password CLI (`op`) | | `dev-unlock-server` | Unlock the encrypted root filesystem on a server | 1Password CLI (`op`) | | `dev-archive-repo` | Mirror a repo to the archive server | | - -To work on the tools themselves, see [docs/development.md](docs/development.md). diff --git a/docs/development.md b/docs/development.md deleted file mode 100644 index 1803b26..0000000 --- a/docs/development.md +++ /dev/null @@ -1,17 +0,0 @@ -# Development - -Please contribute! If you find yourself needing to do the same thing over and over, or you keep -forgetting a process, or you just feel you're typing too much to do boring stuff... then create a -script to automate/help/optimise it. And then we can all benefit. - -## Tooling - -The scripts are checked with shellcheck and formatted with shfmt: - -```console -$ make install-local -$ make format -$ make lint -``` - -`make lint` is also what CI runs on every push. From d94818b6f4ee1d7e682eb37552570a766576be0d Mon Sep 17 00:00:00 2001 From: Kyle Stevenson Date: Mon, 26 Oct 2026 16:49:18 +0000 Subject: [PATCH 4/6] Update .github/workflows/lint.yml Co-authored-by: Alex Tomkins --- .github/workflows/lint.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index fd0ca73..2251376 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,8 +1,13 @@ name: lint -on: - push: - pull_request: +on: pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read jobs: lint: From ba94bff714c2d3d9463b89beadd4c527eaa8c7b7 Mon Sep 17 00:00:00 2001 From: Kyle Stevenson Date: Mon, 26 Oct 2026 16:49:25 +0000 Subject: [PATCH 5/6] Update .github/workflows/lint.yml Co-authored-by: Alex Tomkins --- .github/workflows/lint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2251376..e41b31f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,8 @@ permissions: jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 + timeout-minutes: 5 steps: - uses: actions/checkout@v4 # shellcheck comes with the runner image, but shfmt doesn't. From c35d8d10a2a3c089e5740b69b03cd326097cf186 Mon Sep 17 00:00:00 2001 From: Kyle Stevenson Date: Mon, 26 Oct 2026 16:49:32 +0000 Subject: [PATCH 6/6] Update .github/workflows/lint.yml Co-authored-by: Alex Tomkins --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e41b31f..80f1466 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-26.04 timeout-minutes: 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # shellcheck comes with the runner image, but shfmt doesn't. - name: Install shfmt run: |