2018-11-11 08:19:04 -08:00
|
|
|
#!/usr/bin/env bash
|
2018-10-29 09:52:26 -07:00
|
|
|
#
|
|
|
|
# Outputs the current crate version
|
|
|
|
#
|
2018-11-11 09:25:59 -08:00
|
|
|
set -e
|
2018-10-29 09:52:26 -07:00
|
|
|
|
|
|
|
cd "$(dirname "$0")"/..
|
|
|
|
|
|
|
|
while read -r name equals value _; do
|
|
|
|
if [[ $name = version && $equals = = ]]; then
|
|
|
|
echo "${value//\"/}"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
done < <(cat Cargo.toml)
|
|
|
|
|
|
|
|
echo Unable to locate version in Cargo.toml 1>&2
|
|
|
|
exit 1
|