Last active
December 11, 2021 09:33
-
-
Save tylerjromeo/c148faf82a8041356e12accb5c564996 to your computer and use it in GitHub Desktop.
MsBuild targets to edit android build version in android manifest and iOS build version in info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="BeforeBuild" Condition=" $(SetVersion) == true "> | |
<XmlPoke XmlInputPath="Info.plist" Query="//dict/key[. = 'CFBundleVersion']/following-sibling::string[1]" Value="$(BuildNumber)" /> | |
<XmlPoke XmlInputPath="Info.plist" Query="//dict/key[. = 'CFBundleShortVersionString']/following-sibling::string[1]" Value="1.0.$(BuildNumber)" /> | |
</Target> | |
<Target Name="BeforeBuild" Condition=" $(SetVersion) == true "> | |
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="<Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' />" Query="manifest/@android:versionCode" Value="$(BuildNumber)" /> | |
<XmlPoke XmlInputPath="Properties\AndroidManifest.xml" Namespaces="<Namespace Prefix='android' Uri='http://schemas.android.com/apk/res/android' />" Query="manifest/@android:versionName" Value="1.0.$(BuildNumber)" /> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment