Clean up generate new release scripts
authorColin Clark <colin.clark@cclark.uk>
Thu, 28 Jul 2022 12:37:06 +0000 (13:37 +0100)
committerColin Clark <colin.clark@cclark.uk>
Thu, 28 Jul 2022 12:37:06 +0000 (13:37 +0100)
scripts/generate-man-page.sh
scripts/new-release.sh
version.sh

index 7794eb1..25a1698 100755 (executable)
@@ -21,6 +21,12 @@ then
        exit 1
 fi
 
+if  [ ! -f build/src/geeqie  ]
+then
+       printf '%s\n' "geeqie executable has not been built"
+       exit 1
+fi
+
 options_file=$(mktemp "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX")
 year=$(date +"%Y")
 
@@ -44,7 +50,7 @@ Copyright (C) 1999-2004 by John Ellis. Copyright (C) 2004-$year by The Geeqie Te
 own  risk! This  software released under the GNU General Public License. Please read the COPYING file for more
 information." > "$options_file"
 
-help2man --no-info --include="$options_file" src/geeqie > geeqie.1
+help2man --no-info --include="$options_file" build/src/geeqie > geeqie.1
 
 doclifter geeqie.1
 mv geeqie.1.xml doc/docbook/CommandLineOptions.xml
index 7231cbe..2d1bd70 100755 (executable)
@@ -113,8 +113,21 @@ else
        git checkout stable/"$version"
 fi
 
-./scripts/generate-man-page.sh
-./doc/create-shortcuts-xml.sh
+# Regenerate to get the new version number in the man page
+rm -rf build
+meson setup build
+ninja -C build
+
+if ! ./scripts/generate-man-page.sh
+then
+       printf '%s\n' "generate-man-page.sh failed"
+       exit 1
+fi
+if ! ./doc/create-shortcuts-xml.sh
+then
+       printf '%s\n' "create-shortcuts-xml.sh failed"
+       exit 1
+fi
 
 git add NEWS
 git add org.geeqie.Geeqie.appdata.xml.in
index 94912c7..6a5f928 100755 (executable)
@@ -3,7 +3,7 @@
 ## @file
 ## @brief Generate the Geeqie version number
 ##
-## This script is called from configure.ac
+## This script is called from meson.build
 ##
 ## If the current branch is "master" a revison number is generated of the form:  
 ## <n.m>+git<date of last commit>-<last commit hash>