Command-line utility to automatically increase iOS / Android / UWP applications version written in Go. It follows Semantic Versioning.
Using Chocolatey:
$ choco install xavtool -version 1.2.1
$ xavtool --versionUsing scoop:
$ scoop bucket add gabrielrobert-bucket https://github.com/gabrielrobert/scoop-bucket
$ scoop install xavtoolUsing brew:
$ brew install gabrielrobert/tap/xavtool
$ xavtool --versionDownload executables on the release page.
$ go build
$ go test -v
$ go install
$ xavtool --version$ xavtool
NAME:
xavtool - Command-line utility to automatically increase applications version
USAGE:
xavtool [global options] command [command options] [arguments...]
VERSION:
1.2.1
AUTHOR:
Gabriel Robert <[email protected]>
COMMANDS:
current, c List current versions
increment, i Increment to next version
set, s Set the current project version
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version$ xavtool increment --help
NAME:
xavtool increment - Increment to next version
USAGE:
xavtool increment [command options] [arguments...]
OPTIONS:
--type value, -t value major, minor, patch (default: "minor")$ xavtool set --help
NAME:
xavtool set - Set the current project version
USAGE:
xavtool set [arguments...]$ xavtool current
1.0.1 - androidApp (...\test\AndroidManifest.xml)
1.0.1 - iOSApp (...\test\Info.plist)
1.0.1.0 - uwpApp (...\test\Package.appxmanifest)
$ git flow release start '1.1.0'
$ xavtool i
1.0.1: New version: 1.1.0 (...\test\AndroidManifest.xml)
1.0.1: New version: 1.1.0 (...\test\Info.plist)
1.0.1.0: New version: 1.1.0.0 (...\test\Package.appxmanifest)
$ git commit -am "Version bump to 1.1.0"
$ git flow release finish -pIt will update these files:
Info.plistAndroidManifest.xmlPackage.appxmanifest
Only these values will be edited:
CFBundleShortVersionString(new version)CFBundleVersion(new version)
Before:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<!-- ... -->
</dict>
</plist>After:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<key>CFBundleVersion</key>
<string>1.1.0</string>
<!-- ... -->
</dict>
</plist>Only these values will be edited:
manifest/@android:versionName(new version)manifest/@android:versionCode(integer computed this way:(major * 1000000) + (minor * 10000) + (patch * 100))
Before:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.xavtool"
android:versionCode="1000100"
android:versionName="1.0.1">
<!-- ... -->
</manifest>After:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.xavtool"
android:versionCode="1010000"
android:versionName="1.1.0">
<!-- ... -->
</manifest>Only these values will be edited:
Package/Identity/@Version(new version with a revision number set to 0)
Before:
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<!-- ... -->
<Identity Name="95748d56-342b-4dae-93f5-aeda0587a1c0" Publisher="CN=gabrielrobert" Version="1.0.1.0"/>
<!-- ... -->
</Package>After:
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<!-- ... -->
<Identity Name="95748d56-342b-4dae-93f5-aeda0587a1c0" Publisher="CN=gabrielrobert" Version="1.1.0.0"/>
<!-- ... -->
</Package>Only these values will be edited:
widget/@version(new version)widget/@ios-CFBundleVersion(new version)widget/@android-versionCode(integer computed this way:(major * 1000000) + (minor * 10000) + (patch * 100))
Before:
<?xml version="1.0" encoding="utf-8"?>
<widget
id="com.example.xavtool"
android-versionCode="1000100"
ios-CFBundleVersion="1.0.1"
version="1.0.1"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- ... -->
</widget>After:
<?xml version="1.0" encoding="utf-8"?>
<widget
id="com.example.xavtool"
android-versionCode="1010000"
ios-CFBundleVersion="1.1.0"
version="1.1.0"
xmlns="http://www.w3.org/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- ... -->
</widget>Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.
