Improve start-new-version to update test app versions
But not demo as it's updated after release only. Demo will get its own script later.
This commit is contained in:
Родитель
5f088ed659
Коммит
4018178762
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.azure.mobile.xamarin.puppet" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.microsoft.azure.mobile.xamarin.puppet" android:versionCode="2" android:versionName="0.5.0" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="16" />
|
||||
<application android:label="SXPuppet" android:icon="@drawable/Icon"></application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
|
@ -27,5 +27,5 @@ using Android.App;
|
|||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("0.1.0-SNAPSHOT")]
|
||||
[assembly: AssemblyFileVersion("0.5.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("0.5.0-SNAPSHOT")]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.azure.mobile.xamarin.forms.puppet">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="2" android:versionName="0.5.0" package="com.microsoft.azure.mobile.xamarin.forms.puppet">
|
||||
<uses-sdk android:minSdkVersion="15" />
|
||||
<application android:label="MCFPuppet"></application>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
|
@ -25,5 +25,5 @@ using System.Runtime.InteropServices;
|
|||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyFileVersion("0.5.0.0")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<key>CFBundleIdentifier</key>
|
||||
<string>com.microsoft.azure.mobile.xamarin.forms.puppet</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>0.5.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<string>0.5.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MinimumOSVersion</key>
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<key>CFBundleIdentifier</key>
|
||||
<string>com.microsoft.azure.mobile.xamarin.puppet</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<string>0.5.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<string>0.5.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>MinimumOSVersion</key>
|
||||
|
|
|
@ -2,5 +2,23 @@
|
|||
set -e
|
||||
|
||||
# Replace version in all the assemblies
|
||||
find SDK -name AssemblyInfo.cs | xargs sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$1-SNAPSHOT\")/g"
|
||||
find SDK -name AssemblyInfo.cs | xargs sed -E -i '' "s/(AssemblyFileVersion\(\")(.*)\"\)/\1$1.0\")/g"
|
||||
for file in `find . -name AssemblyInfo.cs | grep -v Demo`
|
||||
do
|
||||
sed -E -i '' "s/(AssemblyInformationalVersion\(\")(.*)\"\)/\1$1-SNAPSHOT\")/g" $file
|
||||
sed -E -i '' "s/(AssemblyFileVersion\(\")(.*)\"\)/\1$1.0\")/g" $file
|
||||
done
|
||||
|
||||
# Replace android versions
|
||||
for file in `find . -name AndroidManifest.xml | grep Properties | grep -v Demo`
|
||||
do
|
||||
sed -E -i '' "s/(android:versionName=\")([^\"]+)/\1$1/g" $file
|
||||
versionCode=$((`grep versionCode $file | sed -E "s/^.*versionCode=\"([^\"]*)\".*$/\1/"`+1))
|
||||
sed -E -i '' "s/(android:versionCode=\")([^\"]+)/\1$versionCode/g" $file
|
||||
done
|
||||
|
||||
# Replace ios versions
|
||||
for file in `find Apps -name Info.plist | egrep -v "/(obj|bin|.*Demo.*)/"`
|
||||
do
|
||||
versionName=$1 perl -pi -e 'undef $/; s/(CFBundleVersion<\/key>\s*<string>)([^<]*)/${1}$ENV{versionName}/' $file
|
||||
versionName=$1 perl -pi -e 'undef $/; s/(CFBundleShortVersionString<\/key>\s*<string>)([^<]*)/${1}$ENV{versionName}/' $file
|
||||
done
|
Загрузка…
Ссылка в новой задаче