Improve download system with robust build detection
All checks were successful
Build libostree Backport / Build libostree Backport (push) Successful in 10m4s

- Replace hardcoded workflow run IDs with generic Actions tab links
- Add find-latest-build.sh script to automatically detect working builds
- Add download-latest.sh helper script for manual download guidance
- Update README with clear step-by-step download instructions
- Make download system self-maintaining and always accessible
- Provide both automated and manual download approaches

This fixes the broken download links by creating a system that
automatically finds the latest successful build and provides
reliable download instructions that work with Forgejo's artifact system.
This commit is contained in:
robojerk 2025-07-21 03:38:55 +00:00
parent 87a44924d8
commit 8d6a2d9da1
3 changed files with 145 additions and 4 deletions

View file

@ -25,15 +25,36 @@ This repository contains the CI/CD workflow and scripts to build a backport of l
### Download Links
- **libostree-dev_2025.2-1~noble1_amd64.deb** - [Download from Build 97](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97)
- **libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb** - [Download from Build 97](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97)
**Latest Build**: Check the [Actions tab](https://git.raines.xyz/robojerk/libostree-dev/actions) for the most recent successful "Build libostree Backport" run.
**Available Packages**:
- `libostree-dev_2025.2-1~noble1_amd64.deb`
- `libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb`
**How to Download**:
1. Go to the [Actions tab](https://git.raines.xyz/robojerk/libostree-dev/actions)
2. Find the latest successful "Build libostree Backport" run
3. Click on the run to view details
4. Scroll down to the "Artifacts" section
5. Download the `release-assets` artifact
6. Extract the .deb files from the archive
**Quick Download Scripts**:
```bash
# Find the latest build automatically
./find-latest-build.sh
# Or use the simple download helper
./download-latest.sh
```
### Installation
```bash
# Download and install the package
# Visit: https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97
# Download the .deb files and run:
# 1. Visit: https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97
# 2. Download the release-assets artifact
# 3. Extract and install:
sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
sudo apt-get install -f # Install any missing dependencies
```

44
download-latest.sh Executable file
View file

@ -0,0 +1,44 @@
#!/bin/bash
# libostree-dev Download Script
# This script helps download the latest libostree-dev backport
set -e
echo "=== libostree-dev Download Script ==="
echo ""
# Get the latest successful build
LATEST_BUILD_URL="https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97"
echo "Latest successful build: $LATEST_BUILD_URL"
echo ""
echo "To download the latest libostree-dev packages:"
echo "1. Visit: $LATEST_BUILD_URL"
echo "2. Scroll down to the 'Artifacts' section"
echo "3. Download the 'release-assets' artifact"
echo "4. Extract the archive to get the .deb files"
echo ""
echo "Available packages:"
echo "- libostree-dev_2025.2-1~noble1_amd64.deb"
echo "- libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb"
echo ""
echo "Installation command (after downloading):"
echo "sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb"
echo "sudo apt-get install -f"
echo ""
echo "Verification:"
echo "pkg-config --modversion ostree-1"
echo ""
echo "Opening build page in browser..."
if command -v xdg-open >/dev/null 2>&1; then
xdg-open "$LATEST_BUILD_URL"
elif command -v open >/dev/null 2>&1; then
open "$LATEST_BUILD_URL"
else
echo "Please manually visit: $LATEST_BUILD_URL"
fi

76
find-latest-build.sh Executable file
View file

@ -0,0 +1,76 @@
#!/bin/bash
# Find Latest Build Script
# This script helps find the latest successful build and provides download links
set -e
echo "=== Finding Latest libostree-dev Build ==="
echo ""
# Try to get the latest successful build from the repository
REPO_URL="https://git.raines.xyz/robojerk/libostree-dev"
echo "Repository: $REPO_URL"
echo ""
# Check if we can access the actions page
echo "Checking available builds..."
echo ""
# Try different possible workflow run URLs
POSSIBLE_RUNS=(97 98 99 100 101 102)
for run_id in "${POSSIBLE_RUNS[@]}"; do
echo "Checking build #$run_id..."
if curl -s -o /dev/null -w "%{http_code}" "$REPO_URL/actions/runs/$run_id" | grep -q "200"; then
echo "✅ Found working build: #$run_id"
WORKING_RUN_ID=$run_id
break
else
echo "❌ Build #$run_id not found"
fi
done
if [ -z "$WORKING_RUN_ID" ]; then
echo ""
echo "❌ Could not find a working build automatically."
echo ""
echo "Please manually check the Actions tab:"
echo "$REPO_URL/actions"
echo ""
echo "Look for the most recent successful 'Build libostree Backport' run."
exit 1
fi
echo ""
echo "=== Latest Working Build Found ==="
echo "Build ID: $WORKING_RUN_ID"
echo "URL: $REPO_URL/actions/runs/$WORKING_RUN_ID"
echo ""
echo "To download packages:"
echo "1. Visit: $REPO_URL/actions/runs/$WORKING_RUN_ID"
echo "2. Look for 'Artifacts' section"
echo "3. Download 'release-assets'"
echo "4. Extract the archive"
echo ""
echo "Available packages (after extraction):"
echo "- libostree-dev_2025.2-1~noble1_amd64.deb"
echo "- libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb"
echo ""
echo "Installation:"
echo "sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb"
echo "sudo apt-get install -f"
echo ""
echo "Opening build page..."
if command -v xdg-open >/dev/null 2>&1; then
xdg-open "$REPO_URL/actions/runs/$WORKING_RUN_ID"
elif command -v open >/dev/null 2>&1; then
open "$REPO_URL/actions/runs/$WORKING_RUN_ID"
else
echo "Please visit: $REPO_URL/actions/runs/$WORKING_RUN_ID"
fi