22 lines
877 B
Makefile
22 lines
877 B
Makefile
# Jujutsu targets common to all the crates and to crate-kit itself.
|
|||
|
|
# Included by crate.mk; a repository that is not a crate includes it directly.
|
||
|
|
|
||
|
|
JJ_KIT_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
||
|
|
GREEN ?= \033[0;32m
|
||
|
|
YELLOW ?= \033[1;33m
|
||
|
|
BLUE ?= \033[1;34m
|
||
|
|
NC ?= \033[0m
|
||
|
|
|
||
|
|
## jjnew: Documents the current commit then creates a new one
|
||
|
|
jjnew:
|
||
|
|
@echo "$(YELLOW)→ Creating a new commit...$(NC)"
|
||
|
|
@jj auto-doc
|
||
|
|
@$(JJ_KIT_DIR)/scripts/new-commit.sh
|
||
|
|
@echo "$(GREEN)✓ Done$(NC)"
|
||
|
|
|
||
|
|
## jjfetch: Fetches the origin and rebases the local work on top of main@origin (nothing is lost)
|
||
|
|
jjfetch:
|
||
|
|
@$(JJ_KIT_DIR)/scripts/jjfetch.sh
|
||
|
|
@# Reruns make to resynchronize .crate-kit/: the Makefile does it at startup, before the rebase, and
|
||
|
|
@# the rebase may have left conflict markers there (kit copy newer than the origin's).
|
||
|
|
@$(MAKE) --no-print-directory -s help >/dev/null
|