Files
ai-shell/Makefile

115 lines
3.4 KiB
Makefile

.PHONY: help install upgrade uninstall build clean test bump-patch bump-minor bump-major release-patch release-minor release-major status push
help:
@echo "AI Shell Development Commands:"
@echo ""
@echo "📦 Package Management:"
@echo " install - Install AI Shell globally using uv tool"
@echo " upgrade - Upgrade existing AI Shell installation"
@echo " uninstall - Uninstall AI Shell"
@echo " build - Build the package"
@echo " clean - Clean build artifacts"
@echo " test - Test the installation"
@echo ""
@echo "🔢 Version Management:"
@echo " bump-patch - Bump patch version (0.1.0 -> 0.1.1)"
@echo " bump-minor - Bump minor version (0.1.0 -> 0.2.0)"
@echo " bump-major - Bump major version (0.1.0 -> 1.0.0)"
@echo ""
@echo "🚀 Release Management:"
@echo " release-patch - Release patch version (bump + build + commit + push)"
@echo " release-minor - Release minor version (bump + build + commit + push)"
@echo " release-major - Release major version (bump + build + commit + push)"
@echo ""
@echo "📋 Git Operations:"
@echo " status - Show git status and project info"
@echo " push - Push current changes to remote"
install:
@echo "🚀 Installing AI Shell..."
@uv build
@uv tool install . --force
@echo "✅ AI Shell installed successfully!"
upgrade: bump-patch install
@echo "✅ AI Shell upgraded successfully!"
quick-upgrade:
@echo "🔄 Quick upgrade (patch version)..."
@./quick_upgrade.sh
uninstall:
@echo "🗑️ Uninstalling AI Shell..."
@uv tool uninstall ai-shell || true
@echo "✅ AI Shell uninstalled"
build:
@echo "📦 Building package..."
@uv build
clean:
@echo "🧹 Cleaning build artifacts..."
@rm -rf dist/
@rm -rf build/
@rm -rf *.egg-info/
@echo "✅ Clean complete"
test:
@echo "🧪 Testing AI Shell installation..."
@ai --version
@ai --config
@echo "✅ Test complete"
bump-patch:
@echo "📈 Bumping patch version..."
@python scripts/bump_version.py patch
@echo "✅ Version bumped"
bump-minor:
@echo "📈 Bumping minor version..."
@python scripts/bump_version.py minor
@echo "✅ Version bumped"
bump-major:
@echo "📈 Bumping major version..."
@python scripts/bump_version.py major
@echo "✅ Version bumped"
release-patch:
@echo "🚀 Releasing patch version..."
@./scripts/release.sh patch
release-minor:
@echo "🚀 Releasing minor version..."
@./scripts/release.sh minor
release-major:
@echo "🚀 Releasing major version..."
@./scripts/release.sh major
status:
@echo "📋 AI Shell Project Status:"
@echo ""
@echo "📁 Project Info:"
@echo " Directory: $(PWD)"
@echo " Version: $(shell grep '__version__' ai_shell/__init__.py | cut -d'"' -f2)"
@echo ""
@echo "🔧 Git Status:"
@git status --short || echo " Not a git repository"
@echo ""
@echo "📦 Package Status:"
@echo " Built: $(shell [ -f dist/*.whl ] && echo 'Yes' || echo 'No')"
@echo " Installed: $(shell uv tool list | grep -q ai-shell && echo 'Yes' || echo 'No')"
@echo ""
@echo "🌐 Remote Repository:"
@git remote get-url origin 2>/dev/null | sed 's/:[^@]*@/:***@/' || echo " No remote configured"
push:
@echo "🚀 Pushing to remote repository..."
@git add .
@git status --short
@read -p "Continue with commit and push? [y/N]: " confirm && [ "$$confirm" = "y" ] || exit 1
@read -p "Enter commit message: " message && git commit -m "$$message"
@git push
@echo "✅ Push completed!"