-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (20 loc) · 1.05 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
.PHONY: build clean gomodgen format
typescript:
npx esbuild static/js/components/n-ham-c-lite-yt-async.ts --minify --bundle --outfile=embedassets/assets/js/components/n-ham-c-lite-yt-async.js --format=cjs
npx esbuild static/js/components/n-ham-c-lite-vi-async.ts --minify --bundle --outfile=embedassets/assets/js/components/n-ham-c-lite-vi-async.js --format=cjs
npx esbuild static/js/bootstrap/always-async.ts --minify --bundle --outfile=embedassets/assets/js/bootstrap/always-async.js --format=cjs
build: clean format typescript
export GO111MODULE=on
env GOOS=linux go build -ldflags="-s -w" -o ./bin/htmlassets ./cmds/htmlassets/htmlassets.go
env GOOS=linux go build -ldflags="-s -w" -o ./bin/genimgs ./cmds/genimgs/genimgs.go
# NOTE: Add the `-test.v` flag for verbose logging.
test: gomodget build
mkdir -p coverage/
go test ./... -covermode=atomic -coverprofile ./coverage/cover.out
go tool cover -html=./coverage/cover.out -o ./coverage/cover.html
clean:
rm -rf ./bin ./vendor Gopkg.lock ./embedassets/assets
gomodget:
go get -v all
format:
go fmt ./...