2017-10-29 22:06:41 +00:00
|
|
|
install:
|
|
|
|
cd backend && dep ensure
|
|
|
|
cd backend && go install ./...
|
|
|
|
cd frontend && npm install
|
|
|
|
|
2017-11-07 22:25:25 +00:00
|
|
|
build: assets
|
|
|
|
go build -tags=binassets -o backend/build/cmdui backend/main.go
|
|
|
|
@echo Build complete!
|
|
|
|
@echo Binary is located at backend/build/cmdui
|
|
|
|
|
|
|
|
build_linux: assets build_docker
|
|
|
|
|
|
|
|
build_docker:
|
|
|
|
cd backend && docker build . -t cmdui:build
|
|
|
|
cd backend && docker run -i -v ${PWD}/backend/build:/build cmdui:build \
|
|
|
|
go build -tags=binassets -o /build/cmdui_linux main.go
|
2017-11-07 23:18:19 +00:00
|
|
|
gzip -kf backend/build/cmdui_linux
|
2017-11-07 22:25:25 +00:00
|
|
|
@echo Build complete!
|
2017-11-07 23:18:19 +00:00
|
|
|
@echo Binary: backend/build/cmdui_linux
|
|
|
|
@echo GZIP: backend/build/cmdui_linux.gz
|
2017-11-07 22:25:25 +00:00
|
|
|
|
|
|
|
assets:
|
2017-10-29 22:06:41 +00:00
|
|
|
cd frontend && npm run build
|
|
|
|
go-bindata-assetfs \
|
|
|
|
-o=backend/api/assets/bindata_assetfs.go \
|
|
|
|
-pkg=assets \
|
|
|
|
-prefix=frontend/build \
|
|
|
|
frontend/build/...
|
|
|
|
|
2017-11-07 22:25:25 +00:00
|
|
|
clean:
|
|
|
|
rm -rf frontend/build
|
|
|
|
rm -rf backend/build
|
|
|
|
rm -f backend/api/assets/bindata_assetfs.go
|
2017-11-07 20:08:44 +00:00
|
|
|
|
2017-11-06 23:12:06 +00:00
|
|
|
create_db:
|
|
|
|
sqlite3 backend/data/cmdui.db < backend/schema_sqlite.sql
|
|
|
|
|
2017-10-29 22:06:41 +00:00
|
|
|
cloc:
|
|
|
|
cloc --exclude-dir=vendor,build,node_modules .
|