Currently unused set_versions.sh script
This commit is contained in:
parent
3b63d4fe6b
commit
a262510dc7
1 changed files with 26 additions and 0 deletions
26
set_versions.sh
Executable file
26
set_versions.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue