Skip to content

Commit

Permalink
update choices
Browse files Browse the repository at this point in the history
  • Loading branch information
ericherman committed Nov 2, 2023
1 parent 08d1a9c commit 53dcb0e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 $@

Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion choices
Submodule choices updated from b892f5 to b92349

0 comments on commit 53dcb0e

Please sign in to comment.