# Distribution Configurations

This directory contains configuration files and scripts for distributing azdocli to various package managers.

## Package Managers Supported

### Snapcraft (Linux)
- **Configuration**: `snap/snapcraft.yaml`
- **Generated by**: `scripts/generate-snapcraft.sh`
- **Publication**: Manual via Snapcraft Store

### Homebrew (macOS)
- **Configuration**: `homebrew/azdocli.rb`
- **Generated by**: `scripts/generate-homebrew.sh`
- **Publication**: Submit to homebrew-core or create a tap

### Chocolatey (Windows)
- **Configuration**: `chocolatey/azdocli.nuspec` and `chocolatey/tools/chocolateyinstall.ps1`
- **Generated by**: `scripts/generate-chocolatey.sh`
- **Publication**: Manual via Chocolatey Gallery

### WinGet (Windows)
- **Configuration**: `winget/*.yaml` manifests
- **Generated by**: `scripts/generate-winget.sh`
- **Publication**: Submit PR to microsoft/winget-pkgs

## Automation

The distribution process is automated through the GitHub Actions release workflow:

1. **Build**: Cross-platform binaries are built for Windows, macOS, and Linux
2. **Release**: GitHub release is created with binary assets
3. **Distribution**: Package configurations are generated with correct versions and checksums
4. **Publication**: Configurations are ready for manual or automated publication

## Manual Publication Steps

### Snapcraft
```bash
# Install snapcraft
sudo snap install snapcraft --classic

# Login to Snapcraft
snapcraft login

# Navigate to generated package
cd snap-package-<version>/

# Build snap
snapcraft

# Upload to store
snapcraft upload azdocli_<version>_amd64.snap
```

### Homebrew
```bash
# For homebrew-core (requires maintainer privileges)
# Submit PR with the generated formula to:
# https://github.com/Homebrew/homebrew-core

# For custom tap
brew tap christianhelle/azdocli
# Then submit formula to the tap repository
```

### Chocolatey
```bash
# Install chocolatey CLI
# https://chocolatey.org/install

# Navigate to generated package
cd chocolatey-package-<version>/

# Pack the package
choco pack

# Push to Chocolatey Gallery
choco push azdocli.<version>.nupkg --source https://push.chocolatey.org/
```

### WinGet
```bash
# Clone winget-pkgs repository
git clone https://github.com/microsoft/winget-pkgs.git

# Copy generated manifests to appropriate directory
# manifests/c/ChristianHelle/AzureDevOpsCLI/<version>/

# Submit PR to winget-pkgs repository
```

## Notes

- All package configurations use placeholder values that are replaced during the release process
- SHA256 checksums are automatically calculated for all binary assets
- Version numbers are automatically updated from the release tag
- The scripts are designed to be idempotent and can be run multiple times safely