summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2019-10-17 11:01:28 -0400
committerAdam Jackson <ajax@redhat.com>2019-10-17 11:01:28 -0400
commitb3966ffe08cc30b85f5b628ffa1062a4d7a3641d (patch)
tree982ea8ae7846be40271ffcf4aa508e6226c1dbdc
parentc6f009306eeafee89e36c0f1fcd292ea981dc9ba (diff)
release.sh: Use 'meson introspect' instead of hand-parsing meson.build
-rwxr-xr-xrelease.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/release.sh b/release.sh
index 826c114..bb7e26f 100755
--- a/release.sh
+++ b/release.sh
@@ -370,6 +370,11 @@ process_module() {
use_autogen=1
elif [ -f meson.build ]; then
use_meson=1
+ which jq >& /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Cannot find required jq(1) to parse project metadata"
+ return 1
+ fi
else
echo "Cannot find autogen.sh or meson.build"
return 1
@@ -459,8 +464,8 @@ process_module() {
fi
# Find out the package name from the meson.build file
- pkg_name=`$GREP '^project(' meson.build | sed "s|project([\'\"]\([^\'\"]\+\)[\'\"].*|\1|"`
- pkg_version=`git describe`
+ pkg_name=$(meson introspect $build_dir --projectinfo | jq -r .descriptive_name)
+ pkg_version=$(meson introspect $build_dir --projectinfo | jq -r .version)
tar_root="$build_dir/meson-dist"
announce_dir=$tar_root
fi