Skip to content

Commit

Permalink
#1340: get the version and build info from the python build records s…
Browse files Browse the repository at this point in the history
…o we can get correct values even when packaging on a different host

git-svn-id: https://xpra.org/svn/Xpra/trunk@14157 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 14, 2016
1 parent 18c8025 commit 33ceb7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
14 changes: 5 additions & 9 deletions osx/make-DMG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,16 @@ if [ ! -d "image/Xpra.app" ]; then
exit 1
fi

#get the version and build info from the python build records:
export PYTHONPATH="image/Xpra.app/Contents/Resources/lib/python/"
VERSION=`python -c "from xpra import __version__;import sys;sys.stdout.write(__version__)"`
#prefer revision directly from svn:
REVISION=`svnversion -n .. | awk -F: '{print $2}'`
if [ -z "${REVISION}" ]; then
#fallback to using revision recorded in build info
REVISION=`python -c "from xpra import src_info;import sys;sys.stdout.write(str(src_info.REVISION))"`
fi
#check for 64-bit builds
REVISION=`python -c "from xpra import src_info;import sys;sys.stdout.write(str(src_info.REVISION))"`
BUILD_CPU=`python -c "from xpra import build_info;import sys;sys.stdout.write(str(build_info.BUILD_CPU))"`
BUILD_INFO=""
AMD64=`python -c "import sys;print(sys.maxsize > 2**32)"`
if [ "$AMD64" == "True" ]; then
if [ "$BUILD_CPU" != "i386" ]; then
BUILD_INFO="-x86_64"
fi

DMG_NAME="Xpra$BUILD_INFO-$VERSION-r$REVISION.dmg"
echo "Creating $DMG_NAME"

Expand Down
15 changes: 5 additions & 10 deletions osx/make-PKG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@ if [ ! -d "./image/Xpra.app" ]; then
exit 1
fi

#figure out the version / revision
#get the version and build info from the python build records:
export PYTHONPATH="image/Xpra.app/Contents/Resources/lib/python/"
VERSION=`python -c "from xpra import __version__;import sys;sys.stdout.write(__version__)"`
#prefer revision directly from svn:
REVISION=`svnversion -n .. | awk -F: '{print $2}'`
if [ -z "${REVISION}" ]; then
#fallback to using revision recorded in build info
REVISION=`python -c "from xpra import src_info;import sys;sys.stdout.write(str(src_info.REVISION))"`
fi
#check for 64-bit builds
REVISION=`python -c "from xpra import src_info;import sys;sys.stdout.write(str(src_info.REVISION))"`
BUILD_CPU=`python -c "from xpra import build_info;import sys;sys.stdout.write(str(build_info.BUILD_CPU))"`
BUILD_INFO=""
AMD64=`python -c "import sys;print(sys.maxsize > 2**32)"`
if [ "$AMD64" == "True" ]; then
if [ "$BUILD_CPU" != "i386" ]; then
BUILD_INFO="-x86_64"
fi

PKG_FILENAME="Xpra$BUILD_INFO-$VERSION-r$REVISION.pkg"
rm -f ./image/$PKG_FILENAME >& /dev/null
echo "Making $PKG_FILENAME"
Expand Down

0 comments on commit 33ceb7e

Please sign in to comment.