add git hooks for commit validation, auto-suggestions, and Docker build/push automation on git push
This commit is contained in:
13
Makefile
13
Makefile
@@ -3,7 +3,7 @@ REGISTRY = gitea.chedius.ru/chedius
|
||||
PLATFORM = linux/amd64
|
||||
|
||||
# Build and push both services
|
||||
.PHONY: all build push deploy
|
||||
.PHONY: all build push deploy install-hooks
|
||||
|
||||
all: build push
|
||||
|
||||
@@ -30,11 +30,16 @@ update-server:
|
||||
docker pull $(REGISTRY)/delivery-tracker/frontend:latest
|
||||
docker-compose up -d --force-recreate backend frontend
|
||||
|
||||
# Full workflow: commit, build, push
|
||||
# Install git hooks for automation
|
||||
install-hooks:
|
||||
git config core.hooksPath .githooks
|
||||
chmod +x .githooks/*
|
||||
@echo "✅ Git hooks installed from .githooks/"
|
||||
|
||||
# Full release: commit, push, and auto-build via hook
|
||||
release:
|
||||
@if [ -z "$(MSG)" ]; then echo "Usage: make release MSG='commit message'"; exit 1; fi
|
||||
git add -A
|
||||
git commit -m "$(MSG)" || true
|
||||
git push
|
||||
$(MAKE) build push
|
||||
@echo "Released! Watchtower will deploy within 60 seconds."
|
||||
@echo "✅ Released! Watchtower will deploy within 60 seconds."
|
||||
|
||||
Reference in New Issue
Block a user