From 67ee448dc047e77d64844c5ba1afd2d01a048b95 Mon Sep 17 00:00:00 2001 From: Github Actions Date: Thu, 5 Feb 2026 11:14:07 +0000 Subject: [PATCH] docs --- .gitignore | 3 ++- README.md | 38 ++++++++++++++++++++++++++++++++------ release.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 7 deletions(-) create mode 100755 release.sh diff --git a/.gitignore b/.gitignore index 51da0686fc86..4d5892054e60 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ !PKGBUILD !.SRCINFO !elasticvue.desktop -!README.md \ No newline at end of file +!README.md +!release.sh \ No newline at end of file diff --git a/README.md b/README.md index e2830ae997af..dd5f51039fad 100644 --- a/README.md +++ b/README.md @@ -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 +``` diff --git a/release.sh b/release.sh new file mode 100755 index 000000000000..f75420f6c875 --- /dev/null +++ b/release.sh @@ -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