Make push accept multiline commit messages; ignore Pulumi reports.
Align make push with the Proxmox simulator (cat until Ctrl-D) and stop tracking regenerated pulumi-tests/reports output.
This commit is contained in:
@@ -79,3 +79,6 @@ docker-compose.override.yml
|
||||
|
||||
# Lab probe output (regenerated by scripts/probe_api_surface.py)
|
||||
evidence/_api_surface_probe.json
|
||||
|
||||
# Pulumi suite HTML/JSON reports (regenerated locally)
|
||||
pulumi-tests/reports/*
|
||||
|
||||
@@ -240,21 +240,23 @@ seed: ## Seed simulation data (vSphere; PROFILE= / VSPHERE_PROFILE=small|large|b
|
||||
shell: ## Open an interactive shell in the development container
|
||||
$(COMPOSE) run --rm --no-deps $(SERVICE_DEV) bash
|
||||
|
||||
push: ## git add ., prompt for commit message, push to both remotes
|
||||
@git add .
|
||||
@if git diff --cached --quiet; then \
|
||||
echo "Nothing to commit (working tree clean after git add .)."; \
|
||||
push: ## git add ., multiline commit message (Ctrl-D), push to both remotes
|
||||
@set -e; \
|
||||
git add .; \
|
||||
echo "=== staged ==="; \
|
||||
git status --short; \
|
||||
echo; \
|
||||
if git diff --cached --quiet; then \
|
||||
echo "Nothing to commit — pushing current branch."; \
|
||||
else \
|
||||
printf "Commit message: "; \
|
||||
read -r msg </dev/tty; \
|
||||
if [ -z "$$msg" ]; then \
|
||||
echo "Empty commit message; aborting." >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
echo "Enter commit message, then Ctrl-D:"; \
|
||||
msg=$$(cat </dev/tty); \
|
||||
if [ -z "$$msg" ]; then echo "Empty commit message, aborting." >&2; exit 1; fi; \
|
||||
git commit -m "$$msg"; \
|
||||
fi
|
||||
@echo "Pushing to both remotes via origin..."
|
||||
@git push -u origin HEAD
|
||||
fi; \
|
||||
echo "Pushing to both remotes via origin..."; \
|
||||
git remote get-url --push --all origin 2>/dev/null | sed 's/^/ - /' || true; \
|
||||
git push -u origin HEAD
|
||||
|
||||
clean: ## Remove generated local artifacts
|
||||
rm -rf .coverage coverage.xml htmlcov .mypy_cache .pytest_cache .ruff_cache
|
||||
|
||||
Reference in New Issue
Block a user