diff options
author | Adam Jackson <ajax@redhat.com> | 2019-10-17 11:01:28 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2019-10-17 11:01:28 -0400 |
commit | b3966ffe08cc30b85f5b628ffa1062a4d7a3641d (patch) | |
tree | 982ea8ae7846be40271ffcf4aa508e6226c1dbdc | |
parent | c6f009306eeafee89e36c0f1fcd292ea981dc9ba (diff) |
release.sh: Use 'meson introspect' instead of hand-parsing meson.build
-rwxr-xr-x | release.sh | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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 |