update runner
This commit is contained in:
parent
7ac6728a2c
commit
20a6db03ef
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,3 @@
|
||||||
/paste
|
/paste
|
||||||
/vendor
|
/vendor
|
||||||
/public
|
/public
|
||||||
/src/routes/bindata.go
|
|
||||||
/src/docs/bindata.go
|
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -1,10 +1,5 @@
|
||||||
ROUTE_ASSET=src/routes/bindata.go
|
ROUTE_ASSET=src/routes/bindata.go
|
||||||
ROUTE_FILES=$(wildcard assets/src/*) $(wildcard assets/public/*)
|
|
||||||
|
|
||||||
DOCS_ASSET=src/docs/bindata.go
|
DOCS_ASSET=src/docs/bindata.go
|
||||||
DOCS_FILES=$(wildcard src/docs/ui/*)
|
|
||||||
|
|
||||||
# VENDOR_FILES=$(shell find vendor -type f -name '*.go')
|
|
||||||
|
|
||||||
SOURCE=$(wildcard cmd/paste/*.go) $(filter-out src/routes/bindata.go, $(wildcard src/routes/*.go))
|
SOURCE=$(wildcard cmd/paste/*.go) $(filter-out src/routes/bindata.go, $(wildcard src/routes/*.go))
|
||||||
BINARY=paste
|
BINARY=paste
|
||||||
|
@ -18,12 +13,11 @@ export DUMMY_BINDATA
|
||||||
|
|
||||||
all: $(BINARY)
|
all: $(BINARY)
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BINARY) $(ROUTE_ASSET) $(DOCS_ASSET)
|
rm -rf $(BINARY)
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
go mod download
|
go mod download
|
||||||
go mod vendor
|
go mod vendor
|
||||||
cd assets; npm i
|
|
||||||
fmt:
|
fmt:
|
||||||
go fmt ./...
|
go fmt ./...
|
||||||
test: $(ROUTE_ASSET) $(DOCS_ASSET)
|
test: $(ROUTE_ASSET) $(DOCS_ASSET)
|
||||||
|
@ -33,18 +27,17 @@ run: $(BINARY)
|
||||||
./$(BINARY) -vv serve
|
./$(BINARY) -vv serve
|
||||||
|
|
||||||
$(BINARY): $(SOURCE) $(ROUTE_ASSET) $(DOCS_ASSET)
|
$(BINARY): $(SOURCE) $(ROUTE_ASSET) $(DOCS_ASSET)
|
||||||
# go vet ./...
|
|
||||||
# go test ./...
|
|
||||||
go build "sour.is/x/paste/cmd/paste"
|
go build "sour.is/x/paste/cmd/paste"
|
||||||
|
|
||||||
$(ROUTE_ASSET): $(ROUTE_FILES)
|
build-ui: $(ROUTE_ASSET) $(DOCS_ASSET)
|
||||||
|
$(ROUTE_ASSET):
|
||||||
cd assets; \
|
cd assets; \
|
||||||
rm -rf build ../public; \
|
rm -rf build ../public; \
|
||||||
npm run build; \
|
npm i; npm run build; \
|
||||||
cp -r build ../public
|
cp -r build ../public
|
||||||
go generate "sour.is/x/paste/src/routes"
|
go generate "sour.is/x/paste/src/routes"
|
||||||
|
|
||||||
$(DOCS_ASSET): $(DOCS_FILES) $(SOURCE)
|
$(DOCS_ASSET):
|
||||||
echo "$$DUMMY_BINDATA" > src/docs/bindata.go
|
echo "$$DUMMY_BINDATA" > src/docs/bindata.go
|
||||||
go generate "sour.is/x/paste/cmd/paste"
|
go generate "sour.is/x/paste/cmd/paste"
|
||||||
go generate "sour.is/x/paste/src/docs"
|
go generate "sour.is/x/paste/src/docs"
|
||||||
|
|
477
src/docs/bindata.go
Normal file
477
src/docs/bindata.go
Normal file
File diff suppressed because one or more lines are too long
699
src/routes/bindata.go
Normal file
699
src/routes/bindata.go
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user