s3browser/Makefile

41 lines
872 B
Makefile
Raw Normal View History

2021-09-09 21:33:11 +00:00
BINARY_NAME=s3browser
2021-09-09 20:47:48 +00:00
2021-09-09 21:04:34 +00:00
all: build
build-web: deps-js
2021-09-09 20:47:48 +00:00
yarn --cwd s3browser-frontend run build
2021-09-09 21:04:34 +00:00
build-backend: deps-go
2021-09-09 20:47:48 +00:00
cd s3browser-backend && go build -o "../${BINARY_NAME}" -tags prod ./cmd/s3Browser.go
cp-static:
cp -r s3browser-frontend/build s3browser-backend/internal/static
build: build-web cp-static build-backend
clean:
rm -rf s3browser-frontend/build
rm -rf s3browser-backend/internal/static
rm -f ${BINARY_NAME}
cd s3browser-backend && go clean
2021-09-09 21:04:34 +00:00
deps: deps-js deps-go
deps-js:
2021-09-09 20:47:48 +00:00
yarn --cwd s3browser-frontend install
2021-09-09 21:04:34 +00:00
deps-go:
2021-09-09 20:47:48 +00:00
cd s3browser-backend && go mod download
dev-backend:
2021-09-11 13:45:04 +00:00
cd s3browser-backend && env $$(grep -v '^#' .env | xargs) go run ./cmd/s3Browser.go
2021-09-09 20:47:48 +00:00
dev-web:
yarn --cwd s3browser-frontend run start
gen-schema-download:
yarn --cwd s3browser-frontend run graphql:download
gen-schema:
yarn --cwd s3browser-frontend run graphql:gen