mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-21 23:53:24 +01:00
bump-package-version-rpm: support multiple specs per dir
This commit is contained in:
parent
76618a3e0b
commit
8372a91d53
@ -3,9 +3,13 @@
|
||||
set -eo pipefail
|
||||
|
||||
new_version="$1"
|
||||
specs="centos/kasmvncserver.spec
|
||||
oracle/kasmvncserver.spec
|
||||
opensuse/kasmvncserver.spec"
|
||||
spec_dirs=(centos oracle opensuse)
|
||||
|
||||
spec_files() {
|
||||
for d in "${spec_dirs[@]}"; do
|
||||
ls "$d"/*.spec
|
||||
done
|
||||
}
|
||||
|
||||
bump_version() {
|
||||
sed -i "s/^Version:.\+/Version: $new_version/" "$1"
|
||||
@ -25,8 +29,7 @@ bump_changelog() {
|
||||
sed -i -e "s/%changelog/%changelog\n$new_changelog_entry/" "$1"
|
||||
}
|
||||
|
||||
IFS=$'\n'
|
||||
for spec_file in $specs; do
|
||||
for spec_file in $(spec_files); do
|
||||
bump_version $spec_file
|
||||
bump_changelog $spec_file
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user