From a262510dc7981dc2cbab034f161f7e67980abe3b Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Mon, 10 Jun 2024 12:09:24 +0200 Subject: [PATCH] Currently unused set_versions.sh script --- set_versions.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 set_versions.sh diff --git a/set_versions.sh b/set_versions.sh new file mode 100755 index 0000000..df1e4bc --- /dev/null +++ b/set_versions.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Currently not used + +$name=SolutionTM +$version=0.1.0 + +# If git is unclean, exit +if ! git diff-index --quiet HEAD --; then + echo "Git is unclean. Please commit your changes before building the RPM package." + exit 1 +fi + +# These should all set the first occurrence of the +# version number in the respective files. + +# Set the version number in the spec file. +sed -i "0,/Version: .*/s/Version: .*/Version: $version/" $name.spec + +# Set the version number in the Cargo.toml file. +sed -i "0,/version = \".*\"/s/version = \".*\"/version = \"$version\"/" Cargo.toml + +# Set the version number in the Cargo.lock file. +sed -i "0,/version = \".*\"/s/version = \".*\"/version = \"$version\"/" Cargo.lock + +git diff \ No newline at end of file