mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-23 10:17:58 +02:00
Add binaries cross compile in CD (#113)
This commit is contained in:
11
Makefile
11
Makefile
@ -1,10 +1,12 @@
|
||||
.PHONY: all install build_frontend build_backend build build_docker watch_frontend watch_backend watch clean clean_docker check_changes go_mod fmt test
|
||||
.PHONY: all all_crosscompile install build_frontend build_backend build build_crosscompile build_docker watch_frontend watch_backend watch clean clean_docker check_changes go_mod fmt test
|
||||
|
||||
# Specify the name of your Go binary output
|
||||
BINARY_NAME := opengist
|
||||
|
||||
all: clean install build
|
||||
|
||||
all_crosscompile: clean install build_frontend build_crosscompile
|
||||
|
||||
install:
|
||||
@echo "Installing NPM dependencies..."
|
||||
@npm ci || (echo "Error: Failed to install NPM dependencies." && exit 1)
|
||||
@ -21,6 +23,9 @@ build_backend:
|
||||
|
||||
build: build_frontend build_backend
|
||||
|
||||
build_crosscompile:
|
||||
@bash ./scripts/build-all.sh
|
||||
|
||||
build_docker:
|
||||
@echo "Building Docker image..."
|
||||
docker build -t $(BINARY_NAME):latest .
|
||||
@ -34,12 +39,12 @@ watch_backend:
|
||||
OG_DEV=1 npx nodemon --watch '**/*' -e html,yml,go,js --signal SIGTERM --exec 'go run . --config config.yml'
|
||||
|
||||
watch:
|
||||
@bash ./watch.sh
|
||||
@bash ./scripts/watch.sh
|
||||
|
||||
clean:
|
||||
@echo "Cleaning up build artifacts..."
|
||||
@rm -f $(BINARY_NAME) public/manifest.json
|
||||
@rm -rf public/assets
|
||||
@rm -rf public/assets build
|
||||
|
||||
clean_docker:
|
||||
@echo "Cleaning up Docker image..."
|
||||
|
Reference in New Issue
Block a user