зеркало из https://github.com/github/VFSForGit.git
Merge pull request #733 from nickgra/FixVersionNumber
Mac: Support Version Number overrides
This commit is contained in:
Коммит
03f6d8416c
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче