General rework of the build process (distribution source and rpm).

This commit is contained in:
Doncho N. Gunchev 2024-02-22 11:31:44 +02:00
parent e68638230a
commit 5b8a75b75c
Signed by: dgunchev
GPG key ID: D30FD19F37E002A9
6 changed files with 55 additions and 21 deletions

13
changelog.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/bash
ver=$(git describe --dirty --long --match='v[0-9]*.[0-9]*' | cut -c 2- | cut -d - -f 1,2,4)
rpm_ver="${ver%%-*}"
rpm_rev="${ver#*-}"
rpm_numeric_rev="${rpm_rev%%-*}"
change="* $(date +'%a %b %d %Y') $(git log -1 --format='%aN <%aE>') - ${rpm_ver}-${rpm_numeric_rev}
- $(git log -1 --format=%s)
"
awk -v change="${change}" '/^%changelog/ {print; print change; next} 1' gwebu-profile.spec.in \
> gwebu-profile.spec.tmp && mv gwebu-profile.spec.tmp gwebu-profile.spec.in