From e53a7e1ae10396b9d2d8ceae55005a71e225e2f3 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Tue, 7 Nov 2017 23:25:25 +0100 Subject: [PATCH] Clean the build pipeline --- Makefile | 25 +++++++++++++++++++------ frontend/public/index.html | 1 - 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b9cebd6..473faa4 100644 --- a/Makefile +++ b/Makefile @@ -3,19 +3,32 @@ install: cd backend && go install ./... cd frontend && npm install -build: +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 + @echo Build complete! + @echo Binary is located at backend/build/cmdui_linux + +assets: cd frontend && npm run build go-bindata-assetfs \ -o=backend/api/assets/bindata_assetfs.go \ -pkg=assets \ -prefix=frontend/build \ frontend/build/... - go build -tags=binassets -o backend/build/cmdui backend/main.go -build_linux: - cd backend && docker build . -t cmdui:build - cd backend && docker run -i -v ${PWD}/backend/build:/artefacts cmdui:build \ - go build -o /artefacts/cmdui_linux main.go +clean: + rm -rf frontend/build + rm -rf backend/build + rm -f backend/api/assets/bindata_assetfs.go create_db: sqlite3 backend/data/cmdui.db < backend/schema_sqlite.sql diff --git a/frontend/public/index.html b/frontend/public/index.html index cf373dc..21389b1 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -2,7 +2,6 @@ go-api | commands -