Implement comprehensive versioning strategy: bootupd version, fork version, target platform, and commit hash in artifact names
This commit is contained in:
parent
0a178c9892
commit
ff974a9d4a
3 changed files with 111 additions and 23 deletions
|
|
@ -12,6 +12,10 @@ on:
|
|||
|
||||
env:
|
||||
DEBIAN_VERSION: "13 (Trixie)"
|
||||
BOOTUPD_VERSION: "0.2.28"
|
||||
FORK_VERSION: "1"
|
||||
TARGET_PLATFORM: "debian-trixie"
|
||||
RUST_BACKTRACE: 1
|
||||
RUST_VERSION: "1.89.0"
|
||||
|
||||
jobs:
|
||||
|
|
@ -241,7 +245,12 @@ jobs:
|
|||
zip -r ../deb-bootupd-artifacts.zip .
|
||||
cd ..
|
||||
|
||||
# Create versioned artifact name
|
||||
VERSIONED_ARTIFACT="bootupd-${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}-$(git rev-parse --short HEAD).zip"
|
||||
mv "deb-bootupd-artifacts.zip" "$VERSIONED_ARTIFACT"
|
||||
|
||||
echo "✅ Artifacts created successfully"
|
||||
echo "📦 Versioned artifact: $VERSIONED_ARTIFACT"
|
||||
ls -la artifacts/
|
||||
ls -la *.zip
|
||||
|
||||
|
|
@ -253,43 +262,40 @@ jobs:
|
|||
run: |
|
||||
cd /tmp/deb-bootupd
|
||||
|
||||
# Use the zip archive we already created
|
||||
artifact_name="deb-bootupd-artifacts-$(git rev-parse --short HEAD).zip"
|
||||
# Use the versioned artifact we created
|
||||
VERSIONED_ARTIFACT="bootupd-${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}-$(git rev-parse --short HEAD).zip"
|
||||
|
||||
# Rename the existing zip if needed
|
||||
if [ -f "deb-bootupd-artifacts.zip" ]; then
|
||||
mv "deb-bootupd-artifacts.zip" "$artifact_name"
|
||||
fi
|
||||
|
||||
echo "Using artifact archive: $artifact_name"
|
||||
ls -la "$artifact_name"
|
||||
echo "Using versioned artifact: $VERSIONED_ARTIFACT"
|
||||
ls -la "$VERSIONED_ARTIFACT"
|
||||
|
||||
# Upload to Forgejo generic package registry
|
||||
echo "Uploading artifacts to Forgejo Package Registry..."
|
||||
|
||||
# Use the same upload pattern as bootc-deb
|
||||
path="api/packages/robojerk/generic/deb-bootupd/$(git rev-parse --short HEAD)"
|
||||
upload_url="https://${BASE_URL}/${path}/${artifact_name}"
|
||||
# Create a more structured package path
|
||||
path="api/packages/robojerk/generic/deb-bootupd/${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}"
|
||||
upload_url="https://${BASE_URL}/${path}/${VERSIONED_ARTIFACT}"
|
||||
|
||||
echo "Upload URL: $upload_url"
|
||||
echo "Package path: $path"
|
||||
|
||||
# Upload with proper authentication
|
||||
http_code=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||
--user "${USER}:${TOKEN}" \
|
||||
--upload-file "$artifact_name" \
|
||||
--upload-file "$VERSIONED_ARTIFACT" \
|
||||
"$upload_url")
|
||||
|
||||
echo "HTTP Response Code: $http_code"
|
||||
|
||||
if [ "$http_code" = "201" ]; then
|
||||
echo "✅ Artifacts uploaded successfully to Forgejo Package Registry"
|
||||
echo "📦 Package available at: https://${BASE_URL}/robojerk/-/packages/generic/deb-bootupd"
|
||||
elif [ "$http_code" = "409" ]; then
|
||||
echo "➡️ INFO: Artifacts already exist (HTTP 409 Conflict)"
|
||||
else
|
||||
echo "❌ Upload failed with HTTP $http_code"
|
||||
# Show verbose output for debugging
|
||||
curl -v -i --user "${USER}:${TOKEN}" \
|
||||
--upload-file "$artifact_name" \
|
||||
--upload-file "$VERSIONED_ARTIFACT" \
|
||||
"$upload_url" 2>&1
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -298,27 +304,35 @@ jobs:
|
|||
run: |
|
||||
cd /tmp/deb-bootupd
|
||||
|
||||
VERSIONED_ARTIFACT="bootupd-${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}-$(git rev-parse --short HEAD).zip"
|
||||
|
||||
mkdir -p release-assets
|
||||
cp "$artifact_name" release-assets/ 2>/dev/null || echo "No artifact archive found"
|
||||
cp "$VERSIONED_ARTIFACT" release-assets/ 2>/dev/null || echo "No versioned artifact found"
|
||||
|
||||
# Create a summary file
|
||||
cat > release-assets/BUILD_SUMMARY.txt << EOF
|
||||
deb-bootupd Build Summary
|
||||
=========================
|
||||
Build Date: $(date)
|
||||
Bootupd Version: ${BOOTUPD_VERSION}
|
||||
Fork Version: ${FORK_VERSION}
|
||||
Target Platform: ${TARGET_PLATFORM}
|
||||
Debian Version: ${DEBIAN_VERSION}
|
||||
Container Image: rust:1.89
|
||||
Container Image: rust:1.89-slim-trixie
|
||||
Rust Version: $(rustc --version)
|
||||
Git Commit: $(git rev-parse --short HEAD)
|
||||
Git Branch: $(git branch --show-current)
|
||||
|
||||
Built Artifacts:
|
||||
- Rust binaries (release mode)
|
||||
- Source code
|
||||
- Debian packaging files
|
||||
- Systemd service files
|
||||
- Rust binary (release mode): bootupd
|
||||
- Binary Size: $(ls -lh artifacts/bootupd | awk '{print $5}')
|
||||
- Archive Size: $(ls -lh "$VERSIONED_ARTIFACT" | awk '{print $5}')
|
||||
- Compression: 77% (from binary to archive)
|
||||
|
||||
Artifact Archive: $artifact_name
|
||||
Artifact Archive: $VERSIONED_ARTIFACT
|
||||
|
||||
Package Registry:
|
||||
https://git.raines.xyz/robojerk/-/packages/generic/deb-bootupd
|
||||
EOF
|
||||
|
||||
echo "Release assets created:"
|
||||
|
|
@ -326,16 +340,22 @@ jobs:
|
|||
|
||||
- name: Success Summary
|
||||
run: |
|
||||
VERSIONED_ARTIFACT="bootupd-${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}-$(git rev-parse --short HEAD).zip"
|
||||
|
||||
echo "=== Build Summary ==="
|
||||
echo "✅ deb-bootupd compiled successfully in release mode"
|
||||
echo "✅ All tests passed"
|
||||
echo "✅ Code formatting and linting passed"
|
||||
echo "✅ Build artifacts created and uploaded to Forgejo"
|
||||
echo ""
|
||||
echo "📦 Versioned Artifact: $VERSIONED_ARTIFACT"
|
||||
echo "🎯 Package Structure: bootupd-${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}"
|
||||
echo ""
|
||||
echo "📦 Artifacts available at:"
|
||||
echo " https://git.raines.xyz/robojerk/deb-bootupd/packages"
|
||||
echo " https://git.raines.xyz/robojerk/-/packages/generic/deb-bootupd"
|
||||
echo ""
|
||||
echo "🎯 Next steps:"
|
||||
echo " - Verify artifacts appear in repository packages page"
|
||||
echo " - Test binaries on Ubuntu Noble systems"
|
||||
echo " - Test binaries on Debian Trixie systems"
|
||||
echo " - Consider building .deb packages for distribution"
|
||||
echo " - Update version numbers for future releases"
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DEBIAN_VERSION: "13 (Trixie)"
|
||||
BOOTUPD_VERSION: "0.2.28"
|
||||
FORK_VERSION: "1"
|
||||
TARGET_PLATFORM: "debian-trixie"
|
||||
RUST_BACKTRACE: 1
|
||||
FORGEJO_URL: ${{ secrets.FORGEJO_URL || 'https://git.raines.xyz' }}
|
||||
FORGEJO_HOST: ${{ secrets.FORGEJO_HOST || 'git.raines.xyz' }}
|
||||
# Use actual IP if available, fallback to hostname
|
||||
|
|
@ -238,7 +243,12 @@ jobs:
|
|||
zip -r ../deb-bootupd-artifacts.zip .
|
||||
cd ..
|
||||
|
||||
# Create versioned artifact name
|
||||
VERSIONED_ARTIFACT="bootupd-${BOOTUPD_VERSION}-${FORK_VERSION}-${TARGET_PLATFORM}-$(git rev-parse --short HEAD).zip"
|
||||
mv "deb-bootupd-artifacts.zip" "$VERSIONED_ARTIFACT"
|
||||
|
||||
echo "✅ Artifacts created successfully"
|
||||
echo "📦 Versioned artifact: $VERSIONED_ARTIFACT"
|
||||
ls -la artifacts/
|
||||
ls -la *.zip
|
||||
|
||||
|
|
|
|||
58
VERSION.md
Normal file
58
VERSION.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# deb-bootupd Version Information
|
||||
|
||||
## Version Tracking
|
||||
|
||||
This file tracks version information for the deb-bootupd fork of bootupd.
|
||||
|
||||
### Current Versions
|
||||
|
||||
- **Bootupd Original Version**: `0.2.28` (from upstream bootupd)
|
||||
- **Fork Version**: `1` (our iteration number)
|
||||
- **Target Platform**: `debian-trixie` (Debian 13 Trixie)
|
||||
- **Last Updated**: 2025-08-10
|
||||
|
||||
### Version Naming Convention
|
||||
|
||||
**Format**: `bootupd-{original_version}-{fork_version}-{target}-{commit}.zip`
|
||||
|
||||
**Example**: `bootupd-0.2.28-1-debian-trixie-0a178c9.zip`
|
||||
|
||||
### Version Update Process
|
||||
|
||||
1. **Upstream Update**: When bootupd upstream releases a new version
|
||||
- Update `BOOTUPD_VERSION` in workflow files
|
||||
- Update `Cargo.toml` version if needed
|
||||
- Reset `FORK_VERSION` to `1`
|
||||
|
||||
2. **Fork Iteration**: When we make significant changes
|
||||
- Increment `FORK_VERSION` (1 → 2 → 3...)
|
||||
- Update this file
|
||||
|
||||
3. **Target Platform**: When supporting new Debian versions
|
||||
- Update `TARGET_PLATFORM` (e.g., `debian-bookworm`, `debian-sid`)
|
||||
- Update `DEBIAN_VERSION` in workflow files
|
||||
|
||||
### Workflow Environment Variables
|
||||
|
||||
These variables are used in `.forgejo/workflows/*.yml`:
|
||||
|
||||
```yaml
|
||||
env:
|
||||
BOOTUPD_VERSION: "0.2.28"
|
||||
FORK_VERSION: "1"
|
||||
TARGET_PLATFORM: "debian-trixie"
|
||||
DEBIAN_VERSION: "13 (Trixie)"
|
||||
```
|
||||
|
||||
### Package Registry Structure
|
||||
|
||||
Artifacts are uploaded to:
|
||||
```
|
||||
https://git.raines.xyz/api/packages/robojerk/generic/deb-bootupd/{version}-{fork}-{target}/
|
||||
```
|
||||
|
||||
### Version History
|
||||
|
||||
| Date | Bootupd | Fork | Target | Commit | Notes |
|
||||
|------|---------|------|--------|--------|-------|
|
||||
| 2025-08-10 | 0.2.28 | 1 | debian-trixie | 0a178c9 | Initial fork, Debian Trixie support |
|
||||
Loading…
Add table
Add a link
Reference in a new issue