feat: update pkgrel

This commit is contained in:
Ahmad Husen
2021-10-01 22:53:00 +07:00
parent 581d4292cc
commit 3487dc866b
4 changed files with 20 additions and 4 deletions
+2
View File
@@ -31,6 +31,7 @@ jobs:
uses: ./
with:
pkgver: '0.4.26'
pkgrel: 2
updpkgsums: true
srcinfo: true
@@ -106,6 +107,7 @@ jobs:
uses: ./
with:
pkgver: '0.4.26'
pkgrel: 2
updpkgsums: true
srcinfo: true
+5 -4
View File
@@ -5,9 +5,9 @@
This action allows running tools needed for creating Arch Linux (and AUR) package.
Here's what this action can do:
- Update checksums on PKGBUILD file
- Generate [.SRCINFO](https://wiki.archlinux.org/title/.SRCINFO) based on your PKGBUILD
- Update `pkgver`, `pkgrel`, or checksums on PKGBUILD file
- Validate PKGBUILD with [namcap](https://wiki.archlinux.org/title/namcap)
- Generate [.SRCINFO](https://wiki.archlinux.org/title/.SRCINFO) based on your PKGBUILD
- Run [makepkg](https://wiki.archlinux.org/title/Makepkg) with custom flags (rather than default)
## Usage
@@ -25,6 +25,7 @@ Following inputs can be used as `step.with` keys
|-------------------|-----------|-------------------------------|-----------|---------------------------------------|
| `path` | String | | `false` | Path where PKGBUILD is located. This path always located under $GITHUB_WORKSPACE |
| `pkgver` | String | | `false` | Update `pkgver` on your PKGBUILD |
| `pkgrel` | Integer | | `false` | Update `pkgrel` on your PKGBUILD |
| `updpkgsums` | Boolean | `false` | `false` | Update checksums on your PKGBUILD |
| `srcinfo` | Boolean | `false` | `false` | Generate new .SRCINFO |
| `namcap` | Boolean | `true` | `false` | Validate PKGBUILD |
@@ -121,11 +122,11 @@ jobs:
- name: Validate package
uses: datakrama/archlinux-package-action@v1
with:
path: $GITHUB_WORKSPACE/package
path: package
flags: '-si --noconfirm'
namcap: false
```
## License
The scripts and documentation in this project are released under the [MIT License](./LICENSE)
The scripts and documentation in this project are released under the [MIT License](LICENSE)
+5
View File
@@ -15,6 +15,10 @@ inputs:
description: 'Update pkgver on PKGBUILD'
default: ''
required: false
pkgrel:
description: 'Update pkgrel on PKGBUILD'
default: ''
required: false
updpkgsums:
description: 'Update checksums on PKGBUILD'
default: 'false'
@@ -38,6 +42,7 @@ runs:
args:
- ${{ inputs.path }}
- ${{ inputs.pkgver }}
- ${{ inputs.pkgrel }}
- ${{ inputs.updpkgsums }}
- ${{ inputs.srcinfo }}
- ${{ inputs.flags }}
+8
View File
@@ -19,6 +19,14 @@ if [[ -n $INPUT_PKGVER ]]; then
echo "::endgroup::"
fi
# Update pkgver
if [[ -n $INPUT_PKGREL ]]; then
echo "::group::Updating pkgrel on PKGBUILD"
sed -i "s:^pkgrel=.*$:pkgrel=$INPUT_PKGREL:g" PKGBUILD
git diff PKGBUILD
echo "::endgroup::"
fi
# Update checksums
if [[ $INPUT_UPDPKGSUMS == true ]]; then
echo "::group::Updating checksums on PKGBUILD"