Do either:
- run in the shell
git clone https://github.com/MadGeorge/xcvdetector.git /tmp/xcvd && /tmp/xcvd/make && /tmp/xcvd/make install && rm -rf /tmp/xcvd
- clone repo and run in the shell
cd xcvdetector
./make
./make install
- clone repo and use
swift
command to build it manually
cd xcvdetector
swift build
swift build -c release
Pass path to the project file and bundle id as arguments
$ cd $PROJECT_PATH
$ ls
SomeProjectTests README.md SomeProject SomeProject.xcodeproj
$ xcvdetector -p SomeProject.xcodeproj -b com.companyName.SomeProject
$ 1.0.0_2
$ xcvdetector -p SomeProject.xcodeproj -b com.companyName.SomeProject -f dot
$ 1.0.0.2
$ xcvdetector -p SomeProject.xcodeproj -b com.companyName.SomeProject -f brackets
$ 1.1.0 (1)
Use xcvdetector -h
for detailed usage description
Made for usage with CI/CD server. Fastlane has get_version_number and get_build_number but it relies on xcodebuild's -showBuildSettings
which is slow and may fail unexpectedly.
Fastlane also has no option to return joined version + number.