Merge pull request #733 from nickgra/FixVersionNumber

Mac: Support Version Number overrides
This commit is contained in:
Nick Graczyk 2019-02-01 13:56:33 -08:00 коммит произвёл GitHub
Родитель fc5fa47f23 6e54594a2e
Коммит 03f6d8416c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 17 добавлений и 7 удалений

Просмотреть файл

@ -125,7 +125,7 @@ function CreateMetaInstaller()
echo "$mountCmd"
eval $mountCmd || exit 1
MOUNTEDVOLUME=`/usr/bin/find /Volumes -type d -name "Git $GITVERSIONSTRING*"`
MOUNTEDVOLUME=`/usr/bin/find /Volumes -maxdepth 1 -type d -name "Git $GITVERSIONSTRING*"`
GITINSTALLERPATH=`/usr/bin/find "$MOUNTEDVOLUME" -type f -name "git-$GITVERSIONSTRING*.pkg"`
if [ ! -f "$GITINSTALLERPATH" ]; then

Просмотреть файл

@ -7,6 +7,11 @@ if [ -z $CONFIGURATION ]; then
CONFIGURATION=Debug
fi
VERSION=$2
if [ -z $VERSION ]; then
VERSION="0.2.173.2"
fi
if [ ! -d $VFS_OUTPUTDIR ]; then
mkdir $VFS_OUTPUTDIR
fi
@ -33,8 +38,8 @@ if [ "$CONFIGURATION" == "Profiling(Release)" ]; then
CONFIGURATION=Release
fi
echo 'Generating CommonAssemblyVersion.cs...'
$VFS_SCRIPTDIR/GenerateCommonAssemblyVersion.sh || exit 1
echo "Generating CommonAssemblyVersion.cs as $VERSION..."
$VFS_SCRIPTDIR/GenerateCommonAssemblyVersion.sh $VERSION || exit 1
# /warnasmessage:MSB4011. Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=58564
# Visual Studio Mac does not support explicit import of Sdks. GVFS.Installer.Mac.csproj

Просмотреть файл

@ -1,11 +1,16 @@
. "$(dirname ${BASH_SOURCE[0]})/InitializeEnvironment.sh"
GVFSPROPS=$VFS_SRCDIR/GVFS/GVFS.Build/GVFS.props
VERSIONNUMBER="$(cat $GVFSPROPS | grep GVFSVersion | grep -Eo '[0-9.]+(-\w+)?')"
if [ -z $1 ]; then
echo "Version Number not defined for CommonAssemblyVersion.cs"
fi
# Update the version number in GVFS.props for other consumers of GVFSVersion
sed -i "" -E "s@<GVFSVersion>[0-9]+(\.[0-9]+)*</GVFSVersion>@<GVFSVersion>$1</GVFSVersion>@g" $VFS_SRCDIR/GVFS/GVFS.Build/GVFS.props
# Then generate CommonAssemblyVersion.cs
cat >$VFS_OUTPUTDIR/CommonAssemblyVersion.cs <<TEMPLATE
using System.Reflection;
[assembly: AssemblyVersion("$VERSIONNUMBER")]
[assembly: AssemblyFileVersion("$VERSIONNUMBER")]
[assembly: AssemblyVersion("$1")]
[assembly: AssemblyFileVersion("$1")]
TEMPLATE