blob: 5d0596c9f8fbaac6f1fd2d76a2f50ced1570d597 (
plain)
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
|
#!/usr/bin/env nix
#!nix develop ``.#ci`` --command just --justfile
docker_registry := "registry.fly.io/alanpearce-eu"
docker-tag := env_var_or_default("DOCKER_TAG", `date --utc +%Y%m%d%H%M%S` + "-" + `git rev-parse --short HEAD`)
listen_address := env_var_or_default("LISTEN_ADDRESS", "::1")
tls_port := env_var_or_default("TLS_PORT", "8443")
port := env_var_or_default("PORT", "8080")
default:
@just --list --justfile {{ justfile() }} --unsorted
clean:
rm -fr public
check-licenses:
go-licenses check ./...
check-links:
hyperlink public --sources content
update-all:
nix flake update
go get -u all
build:
templ generate
go run ./cmd/build
dev:
systemfd -s https::{{ listen_address }}:{{ tls_port }} -s http::{{ listen_address }}:{{ port }} -- modd
ci: build check-links
cd *DEPLOY_FLAGS:
fly auth docker
templ generate
fly deploy --image $(KO_DOCKER_REPO={{ docker_registry }} ko build --sbom none --bare --tags {{ docker-tag }} ./cmd/server) {{ DEPLOY_FLAGS }}
|