Skip to content

Commit

Permalink
Increment build (#12)
Browse files Browse the repository at this point in the history
Added better version control commands
Cleaned up documentation
Added release lane when using "RELEASE-" tag
  • Loading branch information
jeffreyrr authored Jul 11, 2019
1 parent f9d179b commit 1929a3c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 27 deletions.
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,11 @@ workflows:
ignore: /.*/
tags:
only: /^v.*/
- release:
requires:
- test-library
filters:
branches:
ignore: /.*/
tags:
only: /^RELEASE-.*/
8 changes: 4 additions & 4 deletions BugSnap Demo App/BugSnap Demo App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -305,7 +305,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -334,7 +334,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 3WBDCZ68AG;
INFOPLIST_FILE = "BugSnap Demo App/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
Expand All @@ -357,7 +357,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = 3WBDCZ68AG;
INFOPLIST_FILE = "BugSnap Demo App/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
Expand Down
2 changes: 1 addition & 1 deletion BugSnap Demo App/BugSnap Demo App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundleVersion</key>
<string>3</string>
<key>ITSAppUsesNonExemptEncryption</key>
Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,6 @@ catch{

In any case you'll be prompted with the user name/ api token to confirm the credentials and it will try to ping the projects names (fetching only one) in order to verify everything was successfully setup.

# Distribution DEMO App

The following only applies if you're distributing the DEMO app and you plan to upload it to the App Store:

* You need the Distribution Certificate in order to create a distribution build
* Install fastlane by follow the [fastlane installation instructions](fastlane/README.md)
* You have to add APPLE_ID to your environment (~/.bash_profile): `export [email protected]`
* See distrbution options by running `fastlane list`
# DEMO App Version Management

Version management is done via fastlane. Please check the project specific [fastlane commands](fastlane/README.md) for more details.
42 changes: 28 additions & 14 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
update_fastlane

default_platform(:ios)

Expand Down Expand Up @@ -117,26 +117,40 @@ platform :ios do
destroy_keychain
end

desc "Bump the build number and commit the changes to git"
lane :buildbump do
desc "Bump the build number"
lane :bumpbuild do
version = get_version_number(xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj")
build = increment_build_number(xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj")
commit_version_bump(
xcodeproj:"BugSnap Demo App/BugSnap Demo App.xcodeproj",
message: "[ver++] v#{version} (#{build})"
puts "Bumped project to v#{version} (#{build}). Please remember to commit changes to git."
end

desc "Increment major version number (i.e.: X.0.0) + build bump"
lane :bumpversionmajor do
version = increment_version_number(
xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj",
bump_type: "major"
)
build = increment_build_number(xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj")
puts "Bumped project to v#{version} (#{build}). Please remember to commit changes to git."
end

desc "Bump the version number and commit the changes to git"
lane :versionbump do
version = increment_version_number(xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj")
build = increment_build_number(
desc "Increment minor version number (i.e.: 1.X.0) + build bump"
lane :bumpversionminor do
version = increment_version_number(
xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj",
build_number: 1
bump_type: "minor"
)
commit_version_bump(
xcodeproj:"BugSnap Demo App/BugSnap Demo App.xcodeproj",
message: "[ver++] v#{version} (#{build})"
build = increment_build_number(xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj")
puts "Bumped project to v#{version} (#{build}). Please remember to commit changes to git."
end

desc "Increment patch version number (i.e.: 1.1.X) + build bump"
lane :bumpversionpatch do
version = increment_version_number(
xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj",
bump_type: "patch"
)
build = increment_build_number(xcodeproj: "BugSnap Demo App/BugSnap Demo App.xcodeproj")
puts "Bumped project to v#{version} (#{build}). Please remember to commit changes to git."
end
end
5 changes: 5 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ or alternatively using `brew cask install fastlane`
fastlane ios test
```
Test Library
### ios development
```
fastlane ios development
```
Build Dev ipa
### ios beta
```
fastlane ios beta
Expand Down

0 comments on commit 1929a3c

Please sign in to comment.