feat: bootstrap foundation application
This commit is contained in:
34
Makefile
Normal file
34
Makefile
Normal file
@@ -0,0 +1,34 @@
|
||||
SHELL := /bin/bash
|
||||
GO := go
|
||||
NPM := npm
|
||||
SERVER_DIR := apps/server
|
||||
WEB_DIR := apps/web
|
||||
SERVER_BIN := $(SERVER_DIR)/bin/md-hub-secure
|
||||
|
||||
.PHONY: web-install web-build server-run server-build server-test docker-build ci fmt
|
||||
|
||||
web-install:
|
||||
cd $(WEB_DIR) && $(NPM) install
|
||||
|
||||
web-build:
|
||||
cd $(WEB_DIR) && $(NPM) run build
|
||||
|
||||
server-run:
|
||||
cd $(SERVER_DIR) && CGO_ENABLED=1 $(GO) run ./cmd/md-hub-secure
|
||||
|
||||
server-build:
|
||||
mkdir -p $(SERVER_DIR)/bin
|
||||
cd $(SERVER_DIR) && CGO_ENABLED=1 $(GO) build -trimpath -o bin/md-hub-secure ./cmd/md-hub-secure
|
||||
|
||||
server-test:
|
||||
cd $(SERVER_DIR) && CGO_ENABLED=1 $(GO) test ./...
|
||||
|
||||
docker-build:
|
||||
docker build -t md-hub-secure:dev .
|
||||
|
||||
fmt:
|
||||
cd $(SERVER_DIR) && $(GO) fmt ./...
|
||||
cd $(WEB_DIR) && $(NPM) run format
|
||||
|
||||
ci: web-build server-test server-build
|
||||
|
||||
Reference in New Issue
Block a user