This commit is contained in:
Github Actions 2026-02-05 11:14:07 +00:00
parent 65e4a06a91
commit 67ee448dc0
3 changed files with 85 additions and 7 deletions

3
.gitignore vendored
View file

@ -6,4 +6,5 @@
!PKGBUILD
!.SRCINFO
!elasticvue.desktop
!README.md
!README.md
!release.sh

View file

@ -1,7 +1,33 @@
# Update Guide
1. Update Version
Edit the PKGBUILD and update the pkgver variable to the new release version (e.g., 1.14.0).
1. Update `PKGBUILD`, set new version
2. Delete untracked git files
3. Run `makepkg -g` to generate SHA
4. Update SHA in `PKGBUILD`
5. Generate SRCINFO `makepkg --printsrcinfo > .SRCINFO`
2. Automate Checksums
Run updpkgsums. This tool downloads the new files and automatically replaces the old hashes in your PKGBUILD.
```bash
updpkgsums
```
Note: This requires the pacman-contrib package.
3. Sync Metadata
Update the .SRCINFO file to match your PKGBUILD changes.
```bash
makepkg --printsrcinfo > .SRCINFO
```
4. Test the Build (Optional but Recommended)
Verify that the package builds and installs correctly with the new versioned binary naming.
```bash
makepkg -sic
```
5. Cleanup & Deploy
Clean up the downloaded source files and push your changes to the AUR.
```bash
git add PKGBUILD .SRCINFO
git commit -m "Update to v$(grep -oP '(?<=pkgver=).*' PKGBUILD)"
git push
```

51
release.sh Executable file
View file

@ -0,0 +1,51 @@
#!/usr/bin/env bash
# Exit on any error
set -e
# 1. Ask for the new version number
read -p "Enter new version (current $(grep -oP '(?<=pkgver=).*' PKGBUILD)): " NEW_VER
if [ -z "$NEW_VER" ]; then
echo "Error: No version entered. Aborting."
exit 1
fi
echo "--- Updating PKGBUILD to $NEW_VER ---"
# 2. Update the pkgver in PKGBUILD
# Also resets pkgrel to 1 for every new version bump
sed -i "s/^pkgver=.*/pkgver=$NEW_VER/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
# 3. Update checksums (requires pacman-contrib)
echo "--- Downloading files and updating SHA256 sums ---"
updpkgsums
# 4. Update .SRCINFO
echo "--- Generating .SRCINFO ---"
makepkg --printsrcinfo > .SRCINFO
# 5. Clean local environment
echo "--- Cleaning up local source files ---"
rm -rf src/ pkg/ *.tar.zst
# 6. Optional Test Build
read -p "Would you like to run a test build? (y/n): " TEST_BUILD
if [[ "$TEST_BUILD" =~ ^[Yy]$ ]]; then
makepkg -sc
fi
# 7. Git Workflow
echo "--- Ready to commit ---"
git add PKGBUILD .SRCINFO
git status
read -p "Commit and push to AUR? (y/n): " CONFIRM
if [[ "$CONFIRM" =~ ^[Yy]$ ]]; then
git commit -m "Update to v$NEW_VER"
git push
echo "🚀 Successfully pushed v$NEW_VER to the AUR!"
else
echo "Push aborted. Your files are updated but not committed."
fi