mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-09 15:38:14 +01:00
28 lines
642 B
Bash
Executable File
28 lines
642 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
|
|
new_version="$1"
|
|
spec_file="centos/kasmvncserver.spec"
|
|
|
|
bump_version() {
|
|
sed -i "s/^Version:.\+/Version: $new_version/" "$spec_file"
|
|
}
|
|
|
|
detect_release_version() {
|
|
release_version=$(sed -ne 's/^Release:\s\+//p' "$spec_file" | sed -e 's/%.\+$//')
|
|
}
|
|
|
|
bump_changelog() {
|
|
detect_release_version
|
|
|
|
local date=$(date +'%a %b %d %Y')
|
|
local changelog_version="$new_version-$release_version"
|
|
local new_changelog_entry="* $date KasmTech <info@kasmweb.com> - $changelog_version\n- Upstream release"
|
|
|
|
sed -i -e "s/%changelog/%changelog\n$new_changelog_entry/" "$spec_file"
|
|
}
|
|
|
|
bump_version
|
|
bump_changelog
|