New shebang for changelog.sh, post-commit hook in README.md.

This commit is contained in:
Doncho N. Gunchev 2024-05-30 03:57:04 +03:00
parent 3df2a4eade
commit 45d926a3a9
Signed by: dgunchev
GPG key ID: D30FD19F37E002A9
3 changed files with 28 additions and 2 deletions

View file

@ -1,4 +1,7 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
shopt -s nullglob dotglob
ver=$(git describe --dirty --long --match='v[0-9]*.[0-9]*' | cut -c 2- | cut -d - -f 1,2,4)
rpm_ver="${ver%%-*}"
@ -14,3 +17,7 @@ awk -v change="${change}" '/^%changelog/ {print; print change; next} 1' gwebu-pr
sed -i "s/Version: .*/Version: ${rpm_ver}/" gwebu-profile.spec.in
sed -i "s/Release: .*/Release: ${rpm_numeric_rev}/" gwebu-profile.spec.in
git add gwebu-profile.spec.in
echo "gwebu-profile.spec.in changelog updated"