]> granicus.if.org Git - graphviz/commitdiff
remove use of sed hacks in autogen.sh to get version components
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 21 Feb 2021 05:06:34 +0000 (21:06 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 27 Feb 2021 18:12:09 +0000 (10:12 -0800)
autogen.sh

index 9c0689ac081d3686d5970a52131037815938691b..87a199b1f96cd9252b4b0750b7233946cfcf9cc2 100755 (executable)
@@ -4,9 +4,9 @@ if ! GRAPHVIZ_VERSION=$( python3 gen_version.py ) ; then
     echo "Error: Failed to set version" >&2
     exit 1
 fi
-GRAPHVIZ_VERSION_MAJOR=$( echo $GRAPHVIZ_VERSION | sed 's/\([^\.]*\).*/\1/' )
-GRAPHVIZ_VERSION_MINOR=$( echo $GRAPHVIZ_VERSION | sed 's/[^\.]*\.\([^\.]*\).*/\1/' )
-GRAPHVIZ_VERSION_PATCH=$( echo $GRAPHVIZ_VERSION | sed 's/[^\.]*\.[^\.]*\.//' )
+GRAPHVIZ_VERSION_MAJOR=$( python3 gen_version.py --major )
+GRAPHVIZ_VERSION_MINOR=$( python3 gen_version.py --minor )
+GRAPHVIZ_VERSION_PATCH=$( python3 gen_version.py --patch )
 
 if ! GRAPHVIZ_GIT_DATE=$( python3 gen_version.py --committer-date-iso ) ; then
     echo "Error: Failed to set date" >&2