-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
48 lines (33 loc) · 1.18 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
run:
go run .
test:
go test # none here currently
go test ./app # none here currently
go test ./checks
# Generate documentation files
docs:
# Note: The generated docs should be committed.
cd docs && go generate
# Publish a release on GitHub (example: v0.7-beta)
release VERSION: ready
# TODO: Automatically get the notes from the changelog file
gh release create "{{VERSION}}" --notes "See CHANGELOG file for notes" {{cross}}/*
# Check to see if you're ready to make a release
ready: docs build-all _no-unstaged-changes
@echo Ready to release
cross := 'cross-platform-builds'
# Build for multiple platforms at once
build-all:
rm -rf {{cross}}
mkdir -p {{cross}}
GOOS=windows GOARCH=amd64 go build -o {{cross}}/localstatus_windows_amd64.exe
GOOS=linux GOARCH=amd64 go build -o {{cross}}/localstatus_linux_amd64
GOOS=darwin GOARCH=amd64 go build -o {{cross}}/localstatus_mac_amd64
GOOS=darwin GOARCH=arm64 go build -o {{cross}}/localstatus_mac_arm64
_no-unstaged-changes:
@echo Checking for unstaged changes...
# https://stackoverflow.com/a/3879077/1076188
git update-index --refresh
git diff-index --quiet HEAD --
# Justfile settings
set ignore-comments := true