mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-14 00:42:44 +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
|
default: build
|
||||||
|
|
||||||
build: $(GOPATH)/bin/godep bindata.go
|
build: bindata.go
|
||||||
$(GOPATH)/bin/godep go build -ldflags "-X main.version=$(VERSION)" .
|
go build -ldflags "-X main.version=$(VERSION)" .
|
||||||
|
|
||||||
pre-commit: bindata.go
|
|
||||||
|
|
||||||
container: bindata.go
|
container: bindata.go
|
||||||
docker build .
|
docker build .
|
||||||
|
|
||||||
gen_css:
|
build_vue:
|
||||||
lessc --verbose -x less/*.less assets/style.css
|
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:
|
bindata.go: build_vue
|
||||||
coffee --compile -o assets coffee/*.coffee
|
go-bindata -o bindata.go assets/...
|
||||||
|
|
||||||
bindata.go: gen_css gen_js
|
|
||||||
go generate
|
|
||||||
|
|
||||||
$(GOPATH)/bin/godep:
|
|
||||||
go get github.com/tools/godep
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
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"
|
package main
|
||||||
|
|
||||||
//go:generate go-bindata assets
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
|
|
4
main.go
4
main.go
|
@ -1,8 +1,6 @@
|
||||||
// +build !appengine
|
// +build !appengine
|
||||||
|
|
||||||
package main // import "github.com/Luzifer/cloudkeys-go"
|
package main
|
||||||
|
|
||||||
//go:generate go-bindata assets
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
Loading…
Reference in a new issue