mirror of
https://codeberg.org/scip/ts.git
synced 2025-12-17 04:30:56 +01:00
Use interfaces, add unit tests, add duration diff support (#3)
* use interface for Duration and Time printing, fix diff ts parsing * add unit tests and gpl * added tests, add support for duration diff+add * bump version * catch setenv errors * fix ci job name
This commit is contained in:
14
Makefile
14
Makefile
@@ -16,7 +16,7 @@
|
||||
|
||||
#
|
||||
# no need to modify anything below
|
||||
tool = gfn
|
||||
tool = ts
|
||||
VERSION = $(shell grep VERSION config.go | head -1 | cut -d '"' -f2)
|
||||
archs = darwin freebsd linux windows
|
||||
PREFIX = /usr/local
|
||||
@@ -37,11 +37,10 @@ install: buildlocal
|
||||
install -o $(UID) -g $(GID) -m 444 $(tool).1 $(PREFIX)/man/man1/
|
||||
|
||||
clean:
|
||||
rm -rf $(tool) coverage.out testdata t/out
|
||||
rm -rf $(tool) coverage.* testdata t/out
|
||||
|
||||
test: clean
|
||||
mkdir -p t/out
|
||||
go test ./... $(ARGS)
|
||||
go test -cover ./... $(ARGS)
|
||||
|
||||
testlint: test lint
|
||||
|
||||
@@ -60,7 +59,8 @@ singletest:
|
||||
|
||||
cover-report:
|
||||
go test ./... -cover -coverprofile=coverage.out
|
||||
go tool cover -html=coverage.out
|
||||
go tool cover -html=coverage.out -o coverage.html
|
||||
chromium coverage.html
|
||||
|
||||
goupdate:
|
||||
go get -t -u=patch ./...
|
||||
@@ -72,8 +72,8 @@ release:
|
||||
gh release create v$(VERSION) --generate-notes
|
||||
|
||||
show-versions: buildlocal
|
||||
@echo "### gfn version:"
|
||||
@./gfn -V
|
||||
@echo "### ts version:"
|
||||
@./ts -V
|
||||
|
||||
@echo
|
||||
@echo "### go module versions:"
|
||||
|
||||
Reference in New Issue
Block a user