diff options
author | Erich Eckner <git@eckner.net> | 2019-09-24 09:16:15 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-09-24 09:16:15 +0200 |
commit | b3f4585b3ff2d9827d8a6826fcb66d02f3f05dc7 (patch) | |
tree | 3279a7f55d7e0eda8cbc9bd5450c929f81d4b27d /bumpPkgrel | |
parent | 7759405ae3fb2a6394b526f290c84f150db9b578 (diff) | |
download | archlinuxewe-b3f4585b3ff2d9827d8a6826fcb66d02f3f05dc7.tar.xz |
bumpPkgrel, bumpVersion: correctly handle git submodules
Diffstat (limited to 'bumpPkgrel')
-rwxr-xr-x | bumpPkgrel | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/bumpPkgrel b/bumpPkgrel index c0db92295..a371d6a9f 100755 --- a/bumpPkgrel +++ b/bumpPkgrel @@ -17,14 +17,23 @@ if [ $# -eq 1 ]; then cd "$(dirname "$0")" pkg="${1%/}" + cd "${pkg}" eval "$( - grep '^pkgrel=' "${pkg}/PKGBUILD" + grep '^pkgrel=' 'PKGBUILD' )" sed -i ' s@^\(pkgrel=\)\('"'"'\?\)[0-9]\+\2$@\1'"$((pkgrel+1))"'@ - ' "${pkg}/PKGBUILD" + ' 'PKGBUILD' if ${commit}; then - git commit "${pkg}/PKGBUILD" -m "${pkg}: rebuild" + if [ -d '.git' ] || [ -f '.git' ]; then + makepkg --printsrcinfo > .SRCINFO + git commit 'PKGBUILD' '.SRCINFO' -m "${pkg}: rebuild" + git push || exit 1 + cd .. + git commit "${paket}" -m "${pkg}: rebuild" + else + git commit 'PKGBUILD' -m "${pkg}: rebuild" + fi fi else |