-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (32 loc) · 1.14 KB
/
Makefile
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
.PHONY: clean dependencies build test run install github-release github-release-dry-run goreleaser-dry-run snap-build snap-list snap-install snap-remove
REPO_NAME = github.com/hoto/fuzzy-repo-finder
clean:
go clean
rm -rf bin/ dist/ *.snap
dependencies:
go mod download
go mod tidy
go mod verify
build: dependencies
go build -ldflags="-X '${REPO_NAME}/pkg/config.Version=0.0.0' -X '${REPO_NAME}/pkg/config.ShortCommit=HASH' -X '${REPO_NAME}/pkg/config.BuildDate=DATE'" -o bin/fuzzy-repo-finder ./cmd/fuzzy-repo-finder/main.go
test:
go test -v ./...
run: clean build
./bin/fuzzy-repo-finder $(arg)
install: clean build
go install -v ./...
goreleaser-release: clean dependencies
curl -sL https://git.io/goreleaser | VERSION=v0.137.0 bash
goreleaser-dry-run: clean dependencies
curl -sL https://git.io/goreleaser | VERSION=v0.137.0 bash -s -- --skip-publish --snapshot --rm-dist
goreleaser-dry-run-local: dependencies
goreleaser release --skip-publish --snapshot --rm-dist
snap-build:
snapcraft
snap-list:
unsquashfs -l *.snap
snap list
snap-install:
sudo snap install --dangerous *.snap
snap-remove:
sudo snap remove fuzzy-repo-finder