Add comprehensive documentation and package building target
📚 Documentation: - VERSION_MANAGEMENT.md: Complete setuptools-scm guide - Enhanced PACKAGE_PUBLISHING.md: Full workflow documentation - Version calculation examples and troubleshooting - Release process and best practices 🎯 New Makefile Target: - `make package`: Build distribution packages with version info - Automatic cleanup and detailed package information - Supports both wheel and source distributions ✨ Features Documented: - Git tag-based version management - Development vs release versions - Complete release workflows - Gitea registry integration - CI/CD integration examples 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Package Publishing to Gitea
|
||||
# Package Publishing Guide
|
||||
|
||||
This document explains how to publish MarkiTect packages to the Gitea package registry.
|
||||
This guide covers building, publishing, and distributing MarkiTect packages using our Gitea package registry and setuptools-scm version management.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -17,40 +17,110 @@ export GITEA_API_TOKEN="your_gitea_api_token_here"
|
||||
echo "export GITEA_API_TOKEN=your_token" >> ~/.bashrc
|
||||
```
|
||||
|
||||
## Usage
|
||||
## Package Building
|
||||
|
||||
### Quick Package Building
|
||||
|
||||
```bash
|
||||
# Build distribution packages (recommended)
|
||||
make package
|
||||
|
||||
# This will:
|
||||
# 1. Show current version (setuptools-scm)
|
||||
# 2. Clean previous builds
|
||||
# 3. Build both wheel and source distribution
|
||||
# 4. Show package details
|
||||
```
|
||||
|
||||
### Manual Building
|
||||
|
||||
```bash
|
||||
# Standard build
|
||||
make build
|
||||
|
||||
# Using release script
|
||||
make release-build
|
||||
python release.py build
|
||||
|
||||
# Manual Python build
|
||||
python -m build
|
||||
```
|
||||
|
||||
## Publishing Workflow
|
||||
|
||||
### Complete Release + Publishing
|
||||
|
||||
```bash
|
||||
# 🚀 ONE-COMMAND RELEASE (recommended)
|
||||
make release-publish-gitea VERSION=0.8.0
|
||||
|
||||
# This complete workflow:
|
||||
# 1. Creates git tag v0.8.0
|
||||
# 2. Builds packages (setuptools-scm uses tag for version 0.8.0)
|
||||
# 3. Uploads both wheel and source distribution to Gitea
|
||||
```
|
||||
|
||||
### Step-by-Step Release
|
||||
|
||||
```bash
|
||||
# 1. Check current status
|
||||
make release-status
|
||||
|
||||
# 2. Validate release readiness
|
||||
make release-validate
|
||||
|
||||
# 3. Create git tag
|
||||
make release-tag VERSION=0.8.0
|
||||
|
||||
# 4. Build packages (version auto-detected from tag)
|
||||
make release-build
|
||||
|
||||
# 5. Upload to Gitea registry
|
||||
make release-upload-gitea
|
||||
```
|
||||
|
||||
### Development Package Testing
|
||||
|
||||
```bash
|
||||
# Build current development version
|
||||
make package
|
||||
|
||||
# Upload development packages for testing
|
||||
python release.py upload --dry-run # Test first
|
||||
python release.py upload # Upload development version
|
||||
```
|
||||
|
||||
## Registry Management
|
||||
|
||||
### Check Registry Status
|
||||
|
||||
```bash
|
||||
# Check registry configuration and authentication
|
||||
# Comprehensive registry information
|
||||
make release-registry
|
||||
# or
|
||||
python release.py registry
|
||||
|
||||
# Shows:
|
||||
# - Authentication status
|
||||
# - Registry URLs
|
||||
# - Existing packages
|
||||
# - Configuration details
|
||||
```
|
||||
|
||||
### Build and Upload Packages
|
||||
### Upload Existing Packages
|
||||
|
||||
```bash
|
||||
# Complete release workflow with Gitea upload
|
||||
make release-publish-gitea VERSION=0.8.0
|
||||
# or
|
||||
python release.py publish --version 0.8.0 --to-gitea
|
||||
|
||||
# Upload existing packages
|
||||
# Upload packages in dist/ folder
|
||||
make release-upload-gitea
|
||||
# or
|
||||
python release.py upload
|
||||
|
||||
# Dry run (test without uploading)
|
||||
# With dry-run testing
|
||||
python release.py upload --dry-run
|
||||
python release.py upload
|
||||
```
|
||||
|
||||
### Traditional Release (without Gitea)
|
||||
### Traditional Release (Git tags only)
|
||||
|
||||
```bash
|
||||
# Standard release without Gitea upload
|
||||
make release-publish VERSION=0.8.0
|
||||
python release.py publish --version 0.8.0
|
||||
```
|
||||
|
||||
## Available Commands
|
||||
|
||||
Reference in New Issue
Block a user