Skip to main content

bump-version

This skill should be used when the user asks to "bump AUR version", "update AUR package version", "bump package version", "update PKGBUILD version", "bump to latest version", or mentions version bumping for AUR packages. Handles automatic version detection, checksum updates, and git commit/push to AUR.

معلومات المصدر

المستودع
asermax/claude-plugins
آخر نشاط في المصدر
٢٢ فبراير ٢٠٢٦ في ٠٥:٢١
لغة SKILL.md المكتشفة
الإنجليزية
النجوم
١
التفرعات
١

خيارات التثبيت

يُحدَّد Prompt الذي يراجع المصدر أولًا بشكل افتراضي. يمكنك التبديل إلى أمر مباشر أو تنزيل نسخة محلية.

مراجعة ملفات المصدر

اقرأ SKILL.md وأي ملفات مرافقة يعرضها SkillsMP قبل أن تقرر التثبيت.

عرض SKILL.md

SKILL.md
تعليمات المصدر · معاينة للقراءة فقط
name
bump-version
description
This skill should be used when the user asks to "bump AUR version", "update AUR package version", "bump package version", "update PKGBUILD version", "bump to latest version", or mentions version bumping for AUR packages. Handles automatic version detection, checksum updates, and git commit/push to AUR.
argument-hint
["version"]
Bump an AUR package to a new version with automatic checksum updates and git push to AUR. Target version: $ARGUMENTS ## Workflow 1. **Determine the new version**: - If version argument provided, use it - Otherwise, automatically detect latest version from package source - Confirm auto-detected version with user before proceeding 2. **Update PKGBUILD**: - Set `pkgver` to new version (without 'v' prefix) - Run `updpkgsums` to regenerate checksums 3. **Update metadata**: ```bash makepkg --printsrcinfo > .SRCINFO ``` 4. **Commit and push**: ```bash git add . git commit -m "chore: bump to <version>" git push ``` ## Version Detection by Source Type ### NPM Packages ```bash npm view <package-name> version ``` For scoped packages: ```bash npm view @scope/package version ``` ### GitHub Releases (for -bin packages) ```bash curl -s "https://api.github.com/repos/user/repo/releases/latest" | \ grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/' ``` ### Go Modules ```bash curl -s "https://proxy.golang.org/module/@v/list" | tail -1 ``` ### Crates.io (Rust) ```bash curl -s "https://crates.io/api/v1/crates/<crate-name>" | jq -r '.crate.newest_version' ``` ### PyPI (Python) ```bash curl -s "https://pypi.org/pypi/<package-name>/json" | jq -r '.info.version' ``` ### Git Repositories (-git packages) For -git packages, the version is dynamically generated by `pkgver()` function. No manual bumping needed - rebuild the package to get the latest commit. ## Parsing PKGBUILD for Source Type To determine how to detect version, read the PKGBUILD and check: 1. **NPM**: Source contains `registry.npmjs.org` 2. **GitHub Releases**: Source contains `github.com` and `-bin` in pkgname 3. **Go**: Source contains proxy.golang.org or go.mod present 4. **Crates.io**: Source contains `crates.io` 5. **PyPI**: Source contains `pypi.org` or `files.pythonhosted.org` 6. **Git (-git)**: pkgname ends with `-git` ## Version Format Always use version number **without** the 'v' prefix: - ✅ `48.2.7` - ❌ `v48.2.7` If upstream uses 'v' prefix in tags, strip it when setting `pkgver`. ## Useful Commands | Command | Purpose | |---------|---------| | `updpkgsums` | Update sha256sums from source files | | `makepkg --printsrcinfo > .SRCINFO` | Regenerate .SRCINFO metadata | | `namcap PKGBUILD` | Verify PKGBUILD after changes | ## Error Handling - **Version not found**: Inform user and ask for manual version input - **Checksum update fails**: Verify source URL is correct and accessible - **Git push fails**: Check AUR SSH credentials and remote configuration
عرض على GitHub