Add script for CI check if version is updated
This commit is contained in:
parent
c6dc6d2bee
commit
ededece3f7
1 changed files with 12 additions and 0 deletions
12
scripts/version-updated
Normal file
12
scripts/version-updated
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Script has to be executed from the repository root directory.
|
||||
|
||||
version=$(grep version bin/core/imag/Cargo.toml | head -n 1 | sed 's,.*=\ ",,; s,"$,,')
|
||||
|
||||
grep "String::from(\"${version}\")" lib/core/libimagrt/src/version.rs 2>/dev/null >/dev/null || \
|
||||
{
|
||||
>&2 echo "No/incorrect version in lib/core/libimagrt/src/version.rs"
|
||||
exit 1
|
||||
}
|
||||
|
Loading…
Reference in a new issue