diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-04-11 18:14:20 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-04-22 13:38:24 +0200 |
commit | ededece3f774aadde25c48b33917795d83c8e30b (patch) | |
tree | 2e7530114e06a5d06c0483b8d50929fd2a6852ad /scripts/version-updated | |
parent | c6dc6d2bee7e66db0ae8651051ab2fecf5de91a4 (diff) |
Add script for CI check if version is updated
Diffstat (limited to 'scripts/version-updated')
-rw-r--r-- | scripts/version-updated | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/version-updated b/scripts/version-updated new file mode 100644 index 00000000..f6f9bfd4 --- /dev/null +++ b/scripts/version-updated @@ -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 +} + |