feat: add Git workflow and release automation
- Add comprehensive Git workflow documentation - Create automated release script (scripts/release.sh) - Enhance Makefile with Git operations and release commands - Add version tagging and remote push automation - Include project status checking and validation - Support for patch/minor/major release workflows
This commit is contained in:
52
Makefile
52
Makefile
@ -1,17 +1,29 @@
|
||||
.PHONY: help install upgrade uninstall build clean test bump-patch bump-minor bump-major
|
||||
.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..."
|
||||
@ -62,3 +74,41 @@ 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!"
|
||||
|
Reference in New Issue
Block a user