mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-08 22:20:05 +00:00
Cleanup makefile, import path and bindata generation
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3a132c8922
commit
10ad0e238d
3 changed files with 12 additions and 20 deletions
24
Makefile
24
Makefile
|
@ -2,25 +2,21 @@ VERSION = $(shell git describe --tags)
|
|||
|
||||
default: build
|
||||
|
||||
build: $(GOPATH)/bin/godep bindata.go
|
||||
$(GOPATH)/bin/godep go build -ldflags "-X main.version=$(VERSION)" .
|
||||
|
||||
pre-commit: bindata.go
|
||||
build: bindata.go
|
||||
go build -ldflags "-X main.version=$(VERSION)" .
|
||||
|
||||
container: bindata.go
|
||||
docker build .
|
||||
|
||||
gen_css:
|
||||
lessc --verbose -x less/*.less assets/style.css
|
||||
build_vue:
|
||||
docker run --rm -i \
|
||||
-v "$(CURDIR):/src" \
|
||||
-w "/src" \
|
||||
node:10-alpine \
|
||||
sh -exc "npm ci && npm run build && chown -R $(shell id -u):$(shell id -g) ."
|
||||
|
||||
gen_js:
|
||||
coffee --compile -o assets coffee/*.coffee
|
||||
|
||||
bindata.go: gen_css gen_js
|
||||
go generate
|
||||
|
||||
$(GOPATH)/bin/godep:
|
||||
go get github.com/tools/godep
|
||||
bindata.go: build_vue
|
||||
go-bindata -o bindata.go assets/...
|
||||
|
||||
publish:
|
||||
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
package main // import "github.com/Luzifer/cloudkeys-go"
|
||||
|
||||
//go:generate go-bindata assets
|
||||
package main
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
|
|
4
main.go
4
main.go
|
@ -1,8 +1,6 @@
|
|||
// +build !appengine
|
||||
|
||||
package main // import "github.com/Luzifer/cloudkeys-go"
|
||||
|
||||
//go:generate go-bindata assets
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
|
Loading…
Reference in a new issue