Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
134 lines (105 loc) · 4.11 KB
/
Copy pathMakefile
File metadata and controls
134 lines (105 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
SHELL := /bin/bash
MAKE_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
OS := $(shell uname -s)
##@ dotfiles 🚀
.PHONY: bootstrap
bootstrap: ## Initialize the project by running the bootstrap script.
$(SHELL) $(MAKE_DIR)/bootstrap/bootstrap.sh
.PHONY: deps
deps: ## Install dependencies for the project based on the OS.
$(SHELL) "$(MAKE_DIR)/bin/dotfiles-project-deps"
.PHONY: sync
sync: ## Update the project and its submodules.
@echo "Updating dotfiles and its submodules 🔄"
git pull --recurse-submodules --jobs=4
@echo "Dotfiles synced successfully 🎉"
##@ agents 🤖
.PHONY: agents-install
agents-install: ## Install shared agent files and app settings.
DOTFILES_DIR="$(MAKE_DIR)" $(SHELL) "$(MAKE_DIR)/bootstrap/bootstrap.sh" --agents
.PHONY: agents-check
agents-check: ## Check the global dotagents installation.
node "$(MAKE_DIR)/ai/tooling/check.mjs"
.PHONY: agents-test
agents-test: ## Test agent configuration merging and Antigravity generation.
npm --prefix "$(MAKE_DIR)/ai/tooling" test
##@ macOS 🍏
.PHONY: brew-bundle
brew-bundle: ## Install packages from the Brewfile.
@echo "Installing packages from Brewfile 📦"
brew bundle --upgrade --file "$(MAKE_DIR)/macos/Brewfile"
@echo "Packages installed successfully 🎉"
.PHONY: brew-cleanup
brew-cleanup: ## Cleanup Homebrew, remove unused packages (dry-run).
@echo "Homebrew cleanup summary 🧹"
brew bundle cleanup --file "$(MAKE_DIR)/macos/Brewfile"
@echo "Homebrew cleanup summary complete 🎉"
.PHONY: brew-cleanup-force
brew-cleanup-force: ## Cleanup Homebrew, remove unused packages.
@echo "Cleaning up Homebrew 🧹"
brew bundle cleanup --force --file "$(MAKE_DIR)/macos/Brewfile"
@echo "Homebrew cleaned up successfully 🎉"
##@ python 🐍
.PHONY: python-install-all
python-install-all: ## Install all python versions onto your system.
@echo "Installing all python versions into ~/.local/bin 🐍"
uv python install 3.13 3.12 3.11 3.10 3.9
uv python install 3.12 --default --preview-features python-install-default
@echo "Python versions installed successfully 🎉"
.PHONY: uv-tool-install-all
uv-tool-install-all: ## Install Python CLI packages from PipFile
@echo "Installing Python packages from UvToolFile 📦"
$(MAKE_DIR)/bin/uv-tool-utils install-file "$(MAKE_DIR)/tools/uv/UvToolFile"
@echo "Python packages installed successfully 🎉"
.PHONY: uv-install
uv-install: ## Install uv Python manager.
$(MAKE_DIR)/bin/uv-install
##@ nvim 🌌
.PHONY: nvim-build
nvim-build: ## Build Neovim from source.
@echo "Building Neovim from source 🚀"
$(MAKE_DIR)/bin/neovim-install
@echo "Neovim built successfully 🎉"
##@ rust 🦀
.PHONY: rust-install
rust-install: ## Install Rust and its components.
$(MAKE_DIR)/bin/rust-install
##@ general 🌐
.PHONY: version
version: ## Show the version of the project.
@git fetch --unshallow 2>/dev/null || true
@git fetch --tags 2>/dev/null || true
@echo "dotfiles $$(git describe --tags --abbrev=0)"
##################################################
# dotfiles development - do not autodocument these
##################################################
# Lint with pre-commit
.PHONY: fmt
fmt:
pre-commit run --all-files
# Build the documentation
.PHONY: docs
docs:
hatch run docs:serve --livereload
# Build the Docker Image
.PHONY: docker-build
docker-build:
docker build -t juftin/juftin:latest .
# Run the Docker Image
.PHONY: docker-run
docker-run:
docker run --rm -it --env TERM --env COLORTERM juftin/juftin:latest
# Pull / Recreate all Submodules
.PHONY: submodules
submodules:
git submodule update --init --recursive --remote --jobs=4
git pull --recurse-submodules --jobs=4
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help message and exit.
################################################
# Auto-Generated Help:
# - "##@" denotes a target category
# - "##" denotes a specific target description
###############################################
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n dotfiles \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-19s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)