From 31e3a1c38d3777e97beb6bd6560887e793fbb853 Mon Sep 17 00:00:00 2001 From: "D. Bohdan" Date: Sun, 26 May 2024 17:58:56 +0000 Subject: [PATCH] build(justfile): replace Make with just --- .github/workflows/ci.yml | 8 +++++--- Makefile | 15 --------------- README.md | 13 +++++++------ justfile | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 24 deletions(-) delete mode 100644 Makefile create mode 100644 justfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6657d86..fa5b16a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,13 @@ jobs: test: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 - name: Download and install Caddy run: wget --output-document caddy.deb --quiet https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_amd64.deb && sudo dpkg -i caddy.deb - name: Download and install Deno run: wget --output-document deno.zip --quiet https://github.com/denoland/deno/releases/download/v1.40.3/deno-x86_64-unknown-linux-gnu.zip && unzip deno.zip deno && sudo install deno /usr/local/bin/ - - name: Checkout - uses: actions/checkout@v4 + - name: Set up just + uses: extractions/setup-just@v2 - name: Run tests - run: make test + run: just test diff --git a/Makefile b/Makefile deleted file mode 100644 index cb1593b..0000000 --- a/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -CADDY ?= caddy - -dev: - find . -type f | entr -r $(CADDY) run - -test: - deno test \ - --allow-env \ - --allow-net \ - --allow-read=Caddyfile \ - --allow-run \ - --allow-write=Caddyfile.test \ - test.ts \ - -.PHONY: dev test diff --git a/README.md b/README.md index 77386a1..df64831 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,13 @@ the style sheet. ## Requirements -* Caddy 2.4 or later. -* Optional: - * [Deno](https://deno.land/) 1.31 or later to run the [tests](test.ts) - (`make test`). - * [entr](https://github.com/eradman/entr) for development - (`make dev`). +- Caddy 2.4 or later. +- Optional: + - [Deno](https://deno.land/) 1.31 or later to run the [tests](test.ts) + (`just test`). + - [entr](https://github.com/eradman/entr) for development + (`just dev`). + - [just](https://github.com/casey/just). ## License diff --git a/justfile b/justfile new file mode 100644 index 0000000..088ecfd --- /dev/null +++ b/justfile @@ -0,0 +1,19 @@ +set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] + +caddy := "caddy" + +default: test + +[unix] +dev: + find . -type f | entr -r {{quote(caddy)}} run + +test: + deno test \ + --allow-env \ + --allow-net \ + --allow-read=Caddyfile \ + --allow-run \ + --allow-write=Caddyfile.test \ + test.ts \ + ;