Tweak the packaging scripts. Add a starting point for the uploader.
This commit is contained in:
@@ -6,7 +6,9 @@ then
|
||||
exit $E_BADARGS
|
||||
fi
|
||||
|
||||
# Replace any dashes in the version string with periods
|
||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
||||
|
||||
sed -i "s/{VERSION}/$PKGVERSION/" PKGBUILD
|
||||
rootdir=`readlink -f $2`
|
||||
sed -i "s|{ROOT}|$rootdir|" PKGBUILD
|
||||
|
||||
@@ -6,7 +6,9 @@ then
|
||||
exit $E_BADARGS
|
||||
fi
|
||||
|
||||
# Replace any dashes in the version string with periods
|
||||
PKGVERSION=`echo $1 | sed "s/-/\\./g"`
|
||||
|
||||
sed -i "s/{VERSION_FIELD}/$PKGVERSION/" openra.spec
|
||||
rootdir=`readlink -f $2`
|
||||
sed -i "s|{ROOT_DIR}|$rootdir|" openra.spec
|
||||
|
||||
@@ -9,7 +9,9 @@ fi
|
||||
# Resolve the absolute source path from the location of this script
|
||||
SRCDIR=$(readlink -f $(dirname $0)/../)
|
||||
BUILTDIR="${SRCDIR}/packaging/built"
|
||||
VERSION=`echo $1 | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||
# TODO: Shift this into the checkout-and-build script
|
||||
#VERSION=`echo $1 | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||
VERSION=$1
|
||||
OUTPUTDIR=$(readlink -f $2)
|
||||
|
||||
# Build the code and push the files into a clean dir
|
||||
|
||||
26
packaging/upload-all.sh
Normal file
26
packaging/upload-all.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
FTPSERVER=openra.res0l.net
|
||||
TAG=$1
|
||||
|
||||
TYPE=`echo $TAG | grep -o "^[a-z]\\+"`
|
||||
VERSION=`echo $TAG | grep -o "[0-9]\\+-\\?[0-9]\\?"`
|
||||
|
||||
case "$TYPE" in
|
||||
"release")
|
||||
FTPPATH="openra.res0l.net/releases"
|
||||
;;
|
||||
"playtest")
|
||||
FTPPATH="openra.res0l.net/playtests"
|
||||
;;
|
||||
*)
|
||||
msg "\E[31m" "Unrecognized tag prefix $TYPE"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
uploader.sh windows "$VERSION" OpenRA-$VERSION.exe "$FTPPATH" "$2" "$3"
|
||||
uploader.sh mac "$VERSION" OpenRA-$VERSION.zip "$FTPPATH" "$2" "$3"
|
||||
|
||||
if [ "$TYPE" = "release" ]; then
|
||||
wput --basename=../ -u ../VERSION ftp://$2:$3@$FTPSERVER/$FTPPATH/master/
|
||||
fi
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash
|
||||
# OpenRA Package uploader script
|
||||
# Usage: uploader.sh <platform> <version string> <package file>
|
||||
# Will upload as user openra and prompt for a password if it's not defined in ~/.netrc
|
||||
# Usage: uploader.sh <platform> <version string> <filename> <ftp path> <username> <password>
|
||||
|
||||
PLATFORM=$1
|
||||
VERSION=$2
|
||||
|
||||
Reference in New Issue
Block a user