open-lark 0.13.0

Enterprise-grade Lark/Feishu Open API SDK with comprehensive Chinese documentation and advanced error handling
Documentation
# Format code
fmt:
  @echo "๐ŸŽจ Formatting code..."
  cargo fmt --all

# Check code formatting
fmt-check:
  @echo "๐Ÿ” Checking code format..."
  cargo fmt --all -- --check

# Lint code
lint:
  @echo "๐Ÿ” Linting code..."
  cargo clippy --workspace --all-targets --all-features -- -Dwarnings

# Run tests
test:
  @echo "๐Ÿงช Running tests..."
  cargo test --all-features

# Build project
build:
  @echo "๐Ÿ”จ Building project..."
  cargo build --all-features

# Build release
build-release:
  @echo "๐Ÿš€ Building release..."
  cargo build --release --all-features

# Generate documentation
docs:
  @echo "๐Ÿ“š Generating documentation..."
  cargo doc --all-features --no-deps

# Run all pre-release checks
check-all: fmt-check lint test build-release docs
  @echo "โœ… All checks passed!"

# Release a new version
release VERSION:
  @echo "๐Ÿš€ Starting release process for version {{VERSION}}"
  
  # Check if on main branch
  @if [ "$(git branch --show-current)" != "main" ]; then \
    echo "โš ๏ธ  Warning: You are not on the main branch (current: $(git branch --show-current))"; \
    read -p "Continue anyway? (y/N): " -n 1 -r; \
    echo; \
    if [[ ! $$REPLY =~ ^[Yy]$$ ]]; then \
      echo "โ„น๏ธ  Aborting release"; \
      exit 1; \
    fi; \
  fi
  
  # Check if working directory is clean
  @if ! git diff-index --quiet HEAD --; then \
    echo "โŒ Working directory is not clean. Please commit or stash your changes."; \
    git status --porcelain; \
    exit 1; \
  fi
  
  # Pull latest changes
  @echo "๐Ÿ”„ Pulling latest changes..."
  git pull origin main
  
  # Check if tag already exists
  @if git tag -l | grep -q "^v{{VERSION}}$$"; then \
    echo "โŒ Tag v{{VERSION}} already exists"; \
    exit 1; \
  fi
  
  # Verify version in Cargo.toml
  @CARGO_VERSION=$$(grep '^version = ' Cargo.toml | cut -d'"' -f2); \
  if [ "$$CARGO_VERSION" != "{{VERSION}}" ]; then \
    echo "โŒ Version mismatch: Cargo.toml has $$CARGO_VERSION, but you specified {{VERSION}}"; \
    echo "โ„น๏ธ  Please update Cargo.toml first"; \
    exit 1; \
  fi
  
  # Run pre-release checks
  @echo "๐Ÿ” Running pre-release checks..."
  just check-all
  
  # Check changelog
  @if ! grep -q "## \[{{VERSION}}\]" CHANGELOG.md; then \
    echo "โš ๏ธ  No changelog entry found for version {{VERSION}}"; \
    echo "โ„น๏ธ  Please update CHANGELOG.md before releasing"; \
    read -p "Continue anyway? (y/N): " -n 1 -r; \
    echo; \
    if [[ ! $$REPLY =~ ^[Yy]$$ ]]; then \
      echo "โ„น๏ธ  Aborting release"; \
      exit 1; \
    fi; \
  fi
  
  # Create and push tag
  @echo "๐Ÿท๏ธ  Creating tag v{{VERSION}}..."
  git tag -a "v{{VERSION}}" -m "Release version {{VERSION}}"
  
  @echo "๐Ÿ“ค Pushing tag to origin..."
  git push origin "v{{VERSION}}"
  
  @echo "โœ… Tag v{{VERSION}} has been created and pushed!"
  @echo "โ„น๏ธ  GitHub Actions will now:"
  @echo "  1. Run validation tests"
  @echo "  2. Create a GitHub release"
  @echo "  3. Publish to crates.io"
  @echo ""
  @echo "โ„น๏ธ  Monitor progress at: https://github.com/foxzool/open-lark/actions"
  @echo ""
  @echo "๐Ÿš€ Release process initiated successfully!"

# Show available commands
help:
  @echo "๐Ÿ“‹ Available commands:"
  @echo "  fmt          - Format code"
  @echo "  fmt-check    - Check code formatting"
  @echo "  lint         - Lint code with clippy"
  @echo "  test         - Run tests"
  @echo "  build        - Build project"
  @echo "  build-release - Build release version"
  @echo "  docs         - Generate documentation"
  @echo "  check-all    - Run all pre-release checks"
  @echo "  release VERSION - Release a new version (e.g., just release 0.4.0)"
  @echo "  help         - Show this help message"