-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
88 lines (71 loc) · 1.91 KB
/
Copy pathjustfile
File metadata and controls
88 lines (71 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
help:
@just --list
# Bump version, update CHANGELOG, tag, and push (requires git-cliff)
bump:
@hack/git-release
# Setup pnpm and spago
setup:
pnpm install
pnpm spago install
# Build the project locally
build:
pnpm run build
# Build a release
release:
pnpm run release
# Run the project locally
run:
pnpm spago run
# Build and run locally
dev: build run
# Run tests
test:
pnpm test
# Format PureScript source code
tidy:
pnpm run tidy
# Enter the Nix development shell
shell:
nix develop
# Nix operations (build, run)
nix command:
@if [ "{{ command }}" = "build" ]; then \
nix build .; \
elif [ "{{ command }}" = "run" ]; then \
./result/bin/corpus-server; \
else \
echo "Unknown nix command: {{ command }}"; \
exit 1; \
fi
# Add a new user (--slug and --db required; --name, --listenbrainz-user, --lastfm-user optional)
add-user *args:
node server.js add-user {{args}}
# Reset the API token for a user (--slug required)
reset-token *args:
node server.js reset-token {{args}}
# List all users
list-users:
node server.js list-users
# Render docs diagrams (requires graphviz)
docs:
hack/graphviz docs/architecture.dot
# Run quality and security checks
check:
pnpm spago build --strict
pnpm exec purs-tidy check "src/**/*.purs" "test/**/*.purs"
pnpm exec elm make src/Client.elm --output=/tmp/corpus-client.js
pnpm exec elm-test
# Manage the container image (build, load, push)
oci command:
@if [ "{{ command }}" = "build" ]; then \
nix build .#container; \
elif [ "{{ command }}" = "load" ]; then \
podman load < result; \
elif [ "{{ command }}" = "push" ]; then \
skopeo copy \
--dest-precompute-digests \
docker-archive:result docker://ghcr.io/mtmn/corpus:latest; \
else \
echo "Unknown container command: {{ command }}"; \
exit 1; \
fi