summaryrefslogtreecommitdiffstats
path: root/pkgup
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-02-05 09:02:45 +0100
committerRemi Collet <remi@php.net>2024-02-05 09:02:45 +0100
commit588819da30d1e4875a3460b3f59c5b809af01373 (patch)
tree7d46837609686f8a0d3ab8c2b4d3fe32c33cb2bf /pkgup
parent7c9b04ea11696d9826bb89631d1cf9f8ba47adbd (diff)
helpers for noarch using 8.2
Diffstat (limited to 'pkgup')
-rwxr-xr-xpkgup10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgup b/pkgup
index 0cdbc52..4ae31ce 100755
--- a/pkgup
+++ b/pkgup
@@ -6,13 +6,18 @@ rpmdate=${rpmdate/ 0/ }
name=$(basename $PWD)
if [ $# -lt 2 ]; then
- echo "usage $0 version commit"
+ echo "usage $0 version commit [ date [ spec ]]"
exit 1
fi
if [ x$3 = x ]; then
+ date=$(date +%Y-%m-%d)
+else
+ date=$3
+fi
+if [ x$4 = x ]; then
name=$(basename $PWD)
else
- name=$(basename $3 .spec)
+ name=$(basename $4 .spec)
fi
sed --regexp-extended \
@@ -20,6 +25,7 @@ sed --regexp-extended \
--expression "/github_version/s/[0-9.]+$/$1/" \
--expression "/upstream_version/s/[0-9.]+$/$1/" \
--expression "/(github|gh)_commit/s/[0-9a-f]{40}$/$2/" \
+ --expression "/(github|gh)_date/s/[0-9\-]{10}$/$date/" \
--expression '/^Release:/s/[0-9.]+/1/' \
--expression "s/%changelog/%changelog\n* $rpmdate $vendor - $1-1\n- update to $1\n/" \
--in-place $name.spec