1
0
Fork 0

Clean the build pipeline

This commit is contained in:
Gregory Eremin 2017-11-07 23:25:25 +01:00
parent a2b2441264
commit e53a7e1ae1
2 changed files with 19 additions and 7 deletions

View File

@ -3,19 +3,32 @@ install:
cd backend && go install ./... cd backend && go install ./...
cd frontend && npm 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 cd frontend && npm run build
go-bindata-assetfs \ go-bindata-assetfs \
-o=backend/api/assets/bindata_assetfs.go \ -o=backend/api/assets/bindata_assetfs.go \
-pkg=assets \ -pkg=assets \
-prefix=frontend/build \ -prefix=frontend/build \
frontend/build/... frontend/build/...
go build -tags=binassets -o backend/build/cmdui backend/main.go
build_linux: clean:
cd backend && docker build . -t cmdui:build rm -rf frontend/build
cd backend && docker run -i -v ${PWD}/backend/build:/artefacts cmdui:build \ rm -rf backend/build
go build -o /artefacts/cmdui_linux main.go rm -f backend/api/assets/bindata_assetfs.go
create_db: create_db:
sqlite3 backend/data/cmdui.db < backend/schema_sqlite.sql sqlite3 backend/data/cmdui.db < backend/schema_sqlite.sql

View File

@ -2,7 +2,6 @@
<html> <html>
<head> <head>
<title>go-api | commands</title> <title>go-api | commands</title>
<!-- <link rel="stylesheet" type="text/css" href="/styles.css"> -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600" rel="stylesheet">
<meta charset="utf-8"> <meta charset="utf-8">
</head> </head>