From 53dcb0e709c96a6cede7cfba889c9546c5c9c86b Mon Sep 17 00:00:00 2001 From: Eric Herman Date: Wed, 1 Nov 2023 17:10:18 +0100 Subject: [PATCH] update choices --- .github/workflows/deploy.yml | 10 ++++++++-- Makefile | 17 ++++++++++------- README.md | 7 +++++-- choices | 2 +- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f9ed0bb..05257e6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,8 +30,14 @@ jobs: steps: - name: checkout uses: actions/checkout@v2 - - name: install-deps - run: sudo apt install -y leiningen make + - name: install-system-deps + run: sudo apt install -y curl make rlwrap clojure + - name: download-newer-clojure + run: curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh + - name: chmod-posix-install + run: chmod +x posix-install.sh + - name: install-newer-clojure + run: sudo ./posix-install.sh - name: make run: make - name: upload diff --git a/Makefile b/Makefile index 04b755d..95d81a6 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: CC0-1.0 -# ensure `lein` is installled -# sudo apt install leiningen +# ensure clj is installed +# https://clojure.org/guides/install_clojure#posix # https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html # $@ : target label @@ -10,18 +10,21 @@ SHELL := bash BROWSER ?= firefox +CLJ ?= clj .PHONY: default default: all -choices/project.clj: +choices/LICENSE: git submodule update --init --recursive ls -l $@ @echo SUCCESS $@ -choices/resources/public/js/choices.js: choices/project.clj config.yml +choices/config.yml: choices/LICENSE config.yml cp -v config.yml choices/config.yml - cd choices && lein fig:min + +choices/resources/public/js/choices.js: choices/LICENSE choices/config.yml + cd choices && $(CLJ) -M:js ls -l $@ @echo SUCCESS $@ @@ -40,8 +43,8 @@ view: choices/resources/public/index.html @echo SUCCESS $@ .PHONY: choices-test -choices-test: choices/project.clj - cd choices && lein test +choices-test: choices/LICENSE choices/config.yml + cd choices && $(CLJ) -M:test @echo SUCCESS $@ .PHONY: check diff --git a/README.md b/README.md index 899e08c..79d8ce6 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,15 @@ We welcome contributions, please create [issues](https://github.com/publiccodene ## Building and testing This tool is built upon [Choices](https://git.sr.ht/~bzg/choices) by [Bastien Guerry](https://sr.ht/~bzg/). -Choices is a ClojureScript project, and can be built with `lein`. +Choices is a ClojureScript project, and uses `clj`. The build process uses `make`. On debian-like systems, `lein` and `make` can be installed with `apt`: ``` -sudo apt install leiningen make +sudo apt install make +curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh +chmod +x posix-install.sh +sudo ./posix-install.sh ``` To make changes, edit the `config.yml` file. diff --git a/choices b/choices index b892f59..b92349f 160000 --- a/choices +++ b/choices @@ -1 +1 @@ -Subproject commit b892f597368729640c17f6e59693eb36fd8d1719 +Subproject commit b92349f9142407bb52af6d77cf3f832d3c2b39f8