Alexandre Julliard : lxr: Run genxref from a cron job to avoid delaying the release process.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Sep 3 06:45:50 CDT 2014


Module: tools
Branch: master
Commit: 4ad638aee8208a76f4e329461f52eddf71f5e259
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=4ad638aee8208a76f4e329461f52eddf71f5e259

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Aug 22 21:22:48 2014 +0200

lxr: Run genxref from a cron job to avoid delaying the release process.

---

 lxr/update-version | 28 ++++++++++++++++++++--------
 wine_release       |  3 ---
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/lxr/update-version b/lxr/update-version
index bed9714..be0a0e6 100755
--- a/lxr/update-version
+++ b/lxr/update-version
@@ -1,23 +1,35 @@
 #!/bin/sh
 #
 # Update the LXR index after a new release of Wine.
+# This should normally be run from a cron job.
 #
-# usage: update-version <version>
+# usage: update-version [<version>]
 #
 
 set -e
 umask 002
 
-if [ $# -lt 1 ]
+gitdir=/home/winehq/opt/source/git/wine.git
+
+if test -z "$1"
 then
-  echo "Usage: $0 version"
-  exit 1
+    version=$(git --git-dir=$gitdir tag --contains HEAD)
+    if test -z "$version"
+    then
+        exit 0  # not a release tag
+    fi
+else
+    version="wine-$1"
 fi
 
-version=$1
-
 cd /home/winehq/opt/source
 
-(echo "wine-$version"; cat wine-versions) | uniq > wine-versions.new && mv -f wine-versions.new wine-versions
+(echo "$version"; cat wine-versions) | uniq > wine-versions.new
+if cmp wine-versions wine-versions.new >/dev/null
+then
+    rm -f wine-versions.new
+    exit 0  # already updated
+fi
 
-./genxref --url=http://source.winehq.org --version=wine-$version
+mv -f wine-versions.new wine-versions
+./genxref --url=http://source.winehq.org --version="$version"
diff --git a/wine_release b/wine_release
index af9e5a7..f6991cb 100755
--- a/wine_release
+++ b/wine_release
@@ -85,7 +85,4 @@ fi
 # add version to bugzilla table
 echo "INSERT INTO bugs.versions (value, product_id) VALUES(\"$version\",1)" | mysql
 
-# make cross reference database for LXR
-$tools_dir/lxr/update-version $version &
-
 # end




More information about the wine-cvs mailing list