mirror of
https://github.com/thomiceli/opengist.git
synced 2024-12-23 04:52:40 +00:00
Add Makefile
This commit is contained in:
parent
01184be205
commit
b48f15690a
1 changed files with 26 additions and 0 deletions
26
Makefile
Normal file
26
Makefile
Normal file
|
@ -0,0 +1,26 @@
|
|||
.PHONY: all install_deps build_frontend build_backend clean
|
||||
|
||||
# Specify the name of your Go binary output
|
||||
BINARY_NAME := opengist
|
||||
|
||||
all: install_deps build_frontend build_backend
|
||||
|
||||
install_deps:
|
||||
@echo "Installing NPM dependencies..."
|
||||
@npm ci || (echo "Error: Failed to install NPM dependencies." && exit 1)
|
||||
@echo "Installing Go dependencies..."
|
||||
@go mod download || (echo "Error: Failed to install Go dependencies." && exit 1)
|
||||
|
||||
build_frontend:
|
||||
@echo "Building frontend assets..."
|
||||
./node_modules/.bin/vite build
|
||||
|
||||
build_backend:
|
||||
@echo "Building Opengist binary..."
|
||||
go build -o $(BINARY_NAME) opengist.go
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up build artifacts..."
|
||||
@rm -f $(BINARY_NAME) public/manifest.json
|
||||
@rm -rf node_modules public/assets
|
||||
|
Loading…
Reference in a new issue