diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..80f1466 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: lint + +on: pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + lint: + runs-on: ubuntu-26.04 + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + # 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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..6ddc06d --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# 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 | | 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.