1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-08 14:10:05 +00:00

Cleanup makefile, import path and bindata generation

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-08-25 12:11:08 +02:00
parent 3a132c8922
commit 10ad0e238d
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
3 changed files with 12 additions and 20 deletions

View file

@ -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

View file

@ -1,6 +1,4 @@
package main // import "github.com/Luzifer/cloudkeys-go"
//go:generate go-bindata assets
package main
import (
"crypto/sha1"

View file

@ -1,8 +1,6 @@
// +build !appengine
package main // import "github.com/Luzifer/cloudkeys-go"
//go:generate go-bindata assets
package main
import (
"context"