justfile (view raw)
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 | default:
@just --list --justfile {{ justfile() }} --unsorted
prepare:
cp -f $(nix build --print-out-paths .#css) frontend/static/base.css
update-go-dependencies:
go get -u all
go mod tidy
gomod2nix
update-nix-dependencies:
nix flake update
update-dependencies: update-go-dependencies update-nix-dependencies
checkformat:
golangci-lint fmt --diff
format:
golangci-lint fmt
fix:
go fix .
test tests="./...":
go test {{ tests }}
check-flake:
nix flake check
ci: checkformat test
build:
nix build .#
generate-defaults:
go run ./cmd/searchix-web defaults > defaults.toml
check-config:
go run ./cmd/searchix-web check-config --config config.toml
precommit:
nix-build -A pre-commit-check
clean-workdir:
git diff --no-ext-diff --quiet
changelog:
convco changelog -u $(convco version --bump) | \
sd -F HEAD $(convco version --print-prefix --bump) | \
prettier --stdin-filepath CHANGELOG.md > CHANGELOG.md
update-nix-package-version:
#!/usr/bin/env bash
VER=$(convco version --bump)
sd 'version = "[^"]+"' "version = \"$VER\"" nix/package.nix
sd '/v[0-9.]+/' "/v$VER/" nix/modules/default.nix
release: clean-workdir changelog update-nix-package-version
#!/bin/sh
set -eu
VERSION=$(convco version --bump --print-prefix)
git add CHANGELOG.md nix/package.nix nix/modules/default.nix
git commit -m "chore: release ${VERSION}"
git tag "${VERSION}"
git push origin main "${VERSION}"
run: dev
dev:
watchexec --restart --exts go,toml,mod -- go run ./cmd/searchix-web --config config.toml serve --dev
ingest *flags:
go run ./cmd/searchix-web --config config.toml ingest --dev {{ flags }}
fetch: (ingest "--fetch")
replace: (ingest "--replace")
reindex: (ingest "--reindex")
|