-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathMakefile
48 lines (38 loc) · 990 Bytes
/
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
47
48
.DEFAULT_GOAL := help
VERSION := v1.8.0
fmt:
gofmt -l .
help:
@echo 'Makefile for Crypt2go'
@echo
@echo 'Usage:'
@echo ' make help Display this help message'
@echo ' make version Display current package version'
@echo ' make update Update dependencies'
@echo ' make release Perform all checks (fmt, test, and lint)'
@echo ' make fmt Format Go files'
@echo ' make test Execute tests'
@echo ' make lint Lint code with golangci-lint'
@echo ' make run Execute program examples'
@echo ' make tag GitHub tag (after manual git commit)'
lint:
golangci-lint run
release: update fmt test lint vet
run:
go run examples/aes/main.go
go run examples/blowfish/main.go
tag:
git push
git tag -a ${VERSION} -m 'Version ${VERSION}'
git push --tags
test:
go test -v ./...
version:
@go version
@echo 'Crypt2go version: ${VERSION}'
vet:
go list ./...
go vet ./...
update:
go get -u ./...
go mod tidy