feat: implement package manager support for Windows and macOS, including Chocolatey and Homebrew configurations
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
This commit is contained in:
parent
1dcce081f1
commit
87884935c9
9 changed files with 758 additions and 10 deletions
126
build/package-managers/README.md
Normal file
126
build/package-managers/README.md
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
# Package Manager Distributions
|
||||
|
||||
This directory contains package manager configurations for distributing WebDropBridge across different platforms.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```
|
||||
build/
|
||||
├── chocolatey/ # Windows - Chocolatey/NuGet package
|
||||
│ ├── webdrop-bridge.nuspec # Package manifest
|
||||
│ └── tools/
|
||||
│ ├── chocolateyInstall.ps1 # Installation script
|
||||
│ └── chocolateyUninstall.ps1 # Uninstallation script
|
||||
│
|
||||
└── homebrew/ # macOS - Homebrew formula
|
||||
└── webdrop-bridge.rb # Homebrew formula
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Chocolatey Package (Windows)
|
||||
|
||||
1. **Build MSI installer**:
|
||||
```bash
|
||||
python build/scripts/build_windows.py --msi
|
||||
```
|
||||
|
||||
2. **Get SHA256 checksum**:
|
||||
```powershell
|
||||
certutil -hashfile build/dist/windows/WebDropBridge_Setup.msi SHA256
|
||||
```
|
||||
|
||||
3. **Update package files**:
|
||||
- `build/chocolatey/webdrop-bridge.nuspec` - update `<version>`
|
||||
- `build/chocolatey/tools/chocolateyInstall.ps1` - update `$Version` and `$Checksum`
|
||||
|
||||
4. **Package it** (requires Chocolatey CLI):
|
||||
```powershell
|
||||
cd build/chocolatey
|
||||
choco pack webdrop-bridge.nuspec
|
||||
```
|
||||
|
||||
5. **Publish** (requires Chocolatey API key):
|
||||
```powershell
|
||||
choco push webdrop-bridge.0.8.0.nupkg --api-key YOUR_KEY
|
||||
```
|
||||
|
||||
### Homebrew Formula (macOS)
|
||||
|
||||
1. **Build DMG installer**:
|
||||
```bash
|
||||
bash build/scripts/build_macos.sh
|
||||
```
|
||||
|
||||
2. **Get SHA256 checksum**:
|
||||
```bash
|
||||
shasum -a 256 build/dist/macos/WebDropBridge_Setup.dmg
|
||||
```
|
||||
|
||||
3. **Update formula**:
|
||||
- `build/homebrew/webdrop-bridge.rb` - update `version` and `sha256`
|
||||
|
||||
4. **Test locally**:
|
||||
```bash
|
||||
brew audit --formula build/homebrew/webdrop-bridge.rb
|
||||
brew install build/homebrew/webdrop-bridge.rb
|
||||
```
|
||||
|
||||
5. **Publish** (create Forgejo tap or submit to official Homebrew):
|
||||
- Option A: Create `homebrew-webdrop-bridge` tap on Forgejo
|
||||
- Option B: Submit to `homebrew/casks` on GitHub
|
||||
|
||||
## Publishing Strategy
|
||||
|
||||
### Recommended Approach for HIM
|
||||
|
||||
1. **Chocolatey**:
|
||||
- Host in internal Artifactory/Azure Artifacts NuGet repository
|
||||
- OR submit to Chocolatey community (chocolatey.org)
|
||||
- Users: `choco install webdrop-bridge`
|
||||
|
||||
2. **Homebrew**:
|
||||
- Create custom tap: `HIM-public/homebrew-webdrop-bridge` on Forgejo
|
||||
- Users add tap: `brew tap HIM-public/webdrop-bridge https://git.him-tools.de/...`
|
||||
- Users: `brew install webdrop-bridge`
|
||||
|
||||
3. **Fallback**:
|
||||
- Direct wget/downloads from Forgejo releases
|
||||
- Built-in auto-update system in app
|
||||
|
||||
## Release Checklist
|
||||
|
||||
When releasing version X.Y.Z:
|
||||
|
||||
- [ ] Build Windows MSI: `python build/scripts/build_windows.py --msi`
|
||||
- [ ] Build macOS DMG: `bash build/scripts/build_macos.sh`
|
||||
- [ ] Calculate checksums (certutil / shasum)
|
||||
- [ ] Create Forgejo release with installers
|
||||
- [ ] Update `build/chocolatey/webdrop-bridge.nuspec` version
|
||||
- [ ] Update `build/chocolatey/tools/chocolateyInstall.ps1` version & checksum
|
||||
- [ ] Update `build/homebrew/webdrop-bridge.rb` version & checksum
|
||||
- [ ] Test Chocolatey package locally
|
||||
- [ ] Test Homebrew formula locally
|
||||
- [ ] Publish to package managers
|
||||
|
||||
## User Installation Commands
|
||||
|
||||
After publishing:
|
||||
|
||||
```powershell
|
||||
# Windows
|
||||
choco install webdrop-bridge
|
||||
```
|
||||
|
||||
```bash
|
||||
# macOS
|
||||
brew tap HIM-public/webdrop-bridge https://git.him-tools.de/HIM-public/homebrew-webdrop-bridge.git
|
||||
brew install webdrop-bridge
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
- [Full Documentation](../../docs/PACKAGE_MANAGER_SUPPORT.md)
|
||||
- [Chocolatey Docs](https://docs.chocolatey.org/)
|
||||
- [Homebrew Docs](https://docs.brew.sh/)
|
||||
- [Forgejo API](https://docs.gitea.com/api/1.22/)
|
||||
Loading…
Add table
Add a link
Reference in a new issue