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)
|
# Lab probe output (regenerated by scripts/probe_api_surface.py)
|
||||||
evidence/_api_surface_probe.json
|
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
|
shell: ## Open an interactive shell in the development container
|
||||||
$(COMPOSE) run --rm --no-deps $(SERVICE_DEV) bash
|
$(COMPOSE) run --rm --no-deps $(SERVICE_DEV) bash
|
||||||
|
|
||||||
push: ## git add ., prompt for commit message, push to both remotes
|
push: ## git add ., multiline commit message (Ctrl-D), push to both remotes
|
||||||
@git add .
|
@set -e; \
|
||||||
@if git diff --cached --quiet; then \
|
git add .; \
|
||||||
echo "Nothing to commit (working tree clean after git add .)."; \
|
echo "=== staged ==="; \
|
||||||
|
git status --short; \
|
||||||
|
echo; \
|
||||||
|
if git diff --cached --quiet; then \
|
||||||
|
echo "Nothing to commit — pushing current branch."; \
|
||||||
else \
|
else \
|
||||||
printf "Commit message: "; \
|
echo "Enter commit message, then Ctrl-D:"; \
|
||||||
read -r msg </dev/tty; \
|
msg=$$(cat </dev/tty); \
|
||||||
if [ -z "$$msg" ]; then \
|
if [ -z "$$msg" ]; then echo "Empty commit message, aborting." >&2; exit 1; fi; \
|
||||||
echo "Empty commit message; aborting." >&2; \
|
|
||||||
exit 1; \
|
|
||||||
fi; \
|
|
||||||
git commit -m "$$msg"; \
|
git commit -m "$$msg"; \
|
||||||
fi
|
fi; \
|
||||||
@echo "Pushing to both remotes via origin..."
|
echo "Pushing to both remotes via origin..."; \
|
||||||
@git push -u origin HEAD
|
git remote get-url --push --all origin 2>/dev/null | sed 's/^/ - /' || true; \
|
||||||
|
git push -u origin HEAD
|
||||||
|
|
||||||
clean: ## Remove generated local artifacts
|
clean: ## Remove generated local artifacts
|
||||||
rm -rf .coverage coverage.xml htmlcov .mypy_cache .pytest_cache .ruff_cache
|
rm -rf .coverage coverage.xml htmlcov .mypy_cache .pytest_cache .ruff_cache
|
||||||
|
|||||||
Reference in New Issue
Block a user