#!/usr/bin/bash -x
# SPDX-FileCopyrightText: 2022 Maxwell G <gotmax@e.email>
# SPDX-License-Identifier: GPL-2.0-or-later

set -euo pipefail

oldversion="${1}"
newversion="${2}"

rpmdev-bumpspec -c "Release ${newversion}" --new "${newversion}" fedrq.spec
sed -i 's|^version.*$|version = "'"${newversion}"'"|' pyproject.toml

git add pyproject.toml fedrq.spec
git commit -S -m "Release ${newversion}"
