-
Notifications
You must be signed in to change notification settings - Fork 3
/
Justfile
32 lines (27 loc) · 895 Bytes
/
Justfile
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
# This Justfile contains rules/targets/scripts/commands that are used when
# developing. Unlike a Makefile, running `just <cmd>` will always invoke
# that command. For more information, see https://github.com/casey/just
#
#
# this setting will allow passing arguments through to tasks, see the docs here
# https://just.systems/man/en/chapter_24.html#positional-arguments
set positional-arguments
# print all available commands by default
default:
just --list
# remove any previously-built binaries
clean:
rm -rf ./bin
rm -rf ./result
# run the test suite
test *args='./...':
go test "$@"
# lint the entire codebase
lint *args:
golangci-lint run --fix --config .golangci.yaml "$@"
find . -name '*.nix' | xargs nixpkgs-fmt
# build the localias cli
build:
#!/usr/bin/env bash
ldflags=$(./scripts/golang-ldflags.sh)
go build -ldflags "$ldflags" -o bin/localias ./cmd/localias