2015-07-29 10:07:42 +00:00
|
|
|
VERSION = $(shell git describe --tags)
|
2015-07-29 07:01:23 +00:00
|
|
|
|
|
|
|
default: build
|
|
|
|
|
2018-08-25 10:11:08 +00:00
|
|
|
build: bindata.go
|
|
|
|
go build -ldflags "-X main.version=$(VERSION)" .
|
2015-07-29 07:01:23 +00:00
|
|
|
|
2015-10-28 12:47:31 +00:00
|
|
|
container: bindata.go
|
2015-07-29 07:01:23 +00:00
|
|
|
docker build .
|
|
|
|
|
2018-11-04 15:47:40 +00:00
|
|
|
vue_dev:
|
|
|
|
docker run --rm -i \
|
|
|
|
-v "$(CURDIR):/src" \
|
|
|
|
-w "/src" -u $(shell id -u) \
|
|
|
|
-p 8080:8080 \
|
|
|
|
node:10-alpine \
|
2020-01-11 16:32:21 +00:00
|
|
|
sh -exc "apk add python && npm ci && npm run serve"
|
2018-11-04 15:47:40 +00:00
|
|
|
|
2018-08-25 10:11:08 +00:00
|
|
|
build_vue:
|
|
|
|
docker run --rm -i \
|
|
|
|
-v "$(CURDIR):/src" \
|
|
|
|
-w "/src" \
|
|
|
|
node:10-alpine \
|
2020-01-11 16:32:21 +00:00
|
|
|
sh -exc "apk add python && npm ci && npm run build"
|
|
|
|
|
|
|
|
lint:
|
|
|
|
docker run --rm -i \
|
|
|
|
-v "$(CURDIR):/src" \
|
|
|
|
-w "/src" \
|
|
|
|
node:10-alpine \
|
|
|
|
sh -exc "apk add python && npm ci && npx eslint src"
|
|
|
|
|
|
|
|
lint-fix:
|
|
|
|
docker run --rm -i \
|
|
|
|
-v "$(CURDIR):/src" \
|
|
|
|
-w "/src" \
|
|
|
|
node:10-alpine \
|
|
|
|
sh -exc "apk add python && npm ci && npx eslint --fix src"
|
2015-10-28 12:47:31 +00:00
|
|
|
|
2020-01-11 18:11:23 +00:00
|
|
|
lint-watch:
|
|
|
|
docker run --rm -i \
|
|
|
|
-v "$(CURDIR):/src" \
|
|
|
|
-w "/src" \
|
|
|
|
node:10-alpine \
|
|
|
|
sh -exc "apk add python && npm ci && while true; do npx eslint src || true; sleep 5; done"
|
|
|
|
|
2018-11-04 15:47:40 +00:00
|
|
|
.PHONY: bindata.go
|
2018-08-25 10:11:08 +00:00
|
|
|
bindata.go: build_vue
|
2018-11-04 15:47:40 +00:00
|
|
|
go-bindata -o bindata.go dist/...
|
2017-12-08 11:58:02 +00:00
|
|
|
|
|
|
|
publish:
|
|
|
|
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
|
|
|
bash golang.sh
|
2017-12-29 20:52:04 +00:00
|
|
|
|
|
|
|
prepare-gae-deploy:
|
2017-12-30 00:02:02 +00:00
|
|
|
rm -rf Dockerfile vendor
|
2017-12-29 20:52:04 +00:00
|
|
|
|
2018-11-04 15:47:40 +00:00
|
|
|
.PHONY: public/wasm_exec.js
|
|
|
|
public/wasm_exec.js:
|
|
|
|
curl -sSfLo public/wasm_exec.js "https://raw.githubusercontent.com/golang/go/go1.11/misc/wasm/wasm_exec.js"
|
|
|
|
|
|
|
|
.PHONY: public/cryptocore.wasm
|
|
|
|
public/cryptocore.wasm:
|
|
|
|
GOOS=js GOARCH=wasm go build -o public/cryptocore.wasm ./cryptocore
|