File: Makefile

package info (click to toggle)
golang-github-corpix-uarand 0.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 320 kB
  • sloc: python: 55; makefile: 27; sh: 7
file content (32 lines) | stat: -rw-r--r-- 844 bytes parent folder | download | duplicates (2)
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
.DEFAULT_GOAL = all

version  := $(shell git rev-list --count HEAD).$(shell git rev-parse --short HEAD)

name     := uarand
package  := github.com/corpix/$(name)

.PHONY: all
all:: useragents.go

.PHONY: test
test:
	go test -v ./...

.PHONY: lint
lint:
.PHONY: lint
lint:
	golangci-lint --color=always                                                       \
		--exclude='uses unkeyed fields'                                            \
		--exclude='type .* is unused'                                              \
		--exclude='should merge variable declaration with assignment on next line' \
		--deadline=120s                                                            \
		run ./...

.PHONY: check
check: lint test

.PHONY: useragents.go
useragents.go:
	./scripts/fetch-user-agents | ./scripts/generate-useragents-go $(name) > $@
	go fmt $@