-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (37 loc) · 1.08 KB
/
justfile
File metadata and controls
49 lines (37 loc) · 1.08 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
set shell := ["bash", "-euo", "pipefail", "-c"]
set dotenv-load := true
set positional-arguments := true
os_default := lowercase(shell("uname -s"))
arch_default := shell("uname -m")
default:
@just defaults
@echo ""
@just --list
defaults:
@echo "OS: {{ os_default }}"
@echo "Arch: {{ arch_default }}"
@echo "{{ shell("go version") }}"
build version="development" os=os_default arch=arch_default: defaults
GOOS="{{ os }}" GOARCH="{{ arch }}" \
go build -ldflags="-X main.Version={{version}} -s -w" \
-trimpath -o "build/outline-cli-{{ os }}-{{ arch }}" ./cmd/outline-cli
build-all version="development":
just build {{ version }} darwin arm64 \
build {{ version }} darwin amd64 \
build {{ version }} linux arm64 \
build {{ version }} linux amd64
publish-assets release_id:
gh release upload {{ release_id }} build/outline-cli-* --clobber
clean:
rm -f outline-cli
rm -rf build/
test:
go test -v ./...
mod:
go mod tidy
go mod verify
fmt:
go fmt ./...
lint:
golangci-lint run ./...
all: clean lint build test