Skip to content

Commit

Permalink
Merge pull request #67 from theappbusiness/develop
Browse files Browse the repository at this point in the history
Deploy to master
  • Loading branch information
samdods authored May 1, 2019
2 parents fe1fb5a + 8764f8d commit 1f4d663
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# CHANGELOG

## [4.0.0]("https://github.com/theappbusiness/MasterFastfile/releases/tag/4.0.0")
## [5.0.1](https://github.com/theappbusiness/MasterFastfile/releases/tag/5.0.1)

Fixes an issue that was causing hockey uploads to fail.

## [5.0.0](https://github.com/theappbusiness/MasterFastfile/releases/tag/5.0.0)

`TAB_PRIMARY_TARGET` environment variable is now mandatory for projects using Icon Overlay.

As of v 2.86.0, fastlane requires a target for get_version_number, used for icon badging.

See discussion here: fastlane/fastlane#12177. See PR #64 for details.

Use intended Bundle ID environment setting for each action

Distinguishing between `FL_UPDATE_PLIST_APP_IDENTIFIER` and `FL_UPDATE_APP_IDENTIFIER`. See PR #63 for details.

## [4.0.0](https://github.com/theappbusiness/MasterFastfile/releases/tag/4.0.0)
### Changed
- Multiple code-level changes for addressing Rubocop errors.
- Provfiles are no longer used, instead you should define export options.
Expand Down
15 changes: 8 additions & 7 deletions Fastfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fastlane_version '2.30.1'
fastlane_version '2.86.0'
default_platform :ios

# --------- Before any lane runs --------- #
Expand Down Expand Up @@ -92,7 +92,7 @@ def _build_and_deploy_to_hockey
end

def _build_number
use_timestamp = ENV['TAB_USE_TIME_FOR_BUILD_NUMBER'] || false
use_timestamp = ENV['TAB_USE_TIME_FOR_BUILD_NUMBER'].to_s.downcase == 'true' || false # rubocop:disable Performance/Casecmp
if use_timestamp
Time.now.strftime("%y%m%d%H%M") # rubocop:disable Style/StringLiterals
else
Expand All @@ -101,7 +101,7 @@ def _build_number
end

def _get_project_build_number
ENV.include?('TAB_PRIMARY_TARGET') ? get_version_number(target: ENV['TAB_PRIMARY_TARGET']) : get_version_number
get_version_number(target: ENV['TAB_PRIMARY_TARGET'])
end

def _set_build_number
Expand All @@ -110,8 +110,7 @@ end

def _build_ipa
update_app_identifier(xcodeproj: ENV['FL_UPDATE_PLIST_PROJECT_PATH'],
plist_path: ENV['FL_UPDATE_PLIST_PATH'],
app_identifier: ENV['FL_UPDATE_PLIST_APP_IDENTIFIER'])
plist_path: ENV['FL_UPDATE_PLIST_PATH'])
update_info_plist
_build_with_gym
end
Expand Down Expand Up @@ -162,7 +161,7 @@ end
def _upload_to_hockey
custom_notes = ENV['TAB_HOCKEY_RELEASE_NOTES'] || ''
notes = custom_notes == '' ? _create_change_log : custom_notes
hockey(notes_type: '0', notes: notes)
hockey(notes_type: '0', notes: notes, bypass_cdn: true)
end

def _create_change_log
Expand All @@ -182,8 +181,10 @@ end
def _notify_slack
return if ENV['FL_SLACK_CHANNEL'].to_s.strip.empty?
hockey_download_url = lane_context[SharedValues::HOCKEY_DOWNLOAD_LINK]
build_number = _build_number
if !hockey_download_url.nil?
new_build_message = "A new build is available on <#{hockey_download_url}|hockey>"
message_prefix = build_number.to_s.empty? ? 'A new build' : "Build #{build_number}"
new_build_message = "#{message_prefix} is available on <#{hockey_download_url}|hockey>"
slack(message: new_build_message)
else
slack
Expand Down
3 changes: 1 addition & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ FL_HOCKEY_TEAMS="" #Hockey ID (number not name)
FL_HOCKEY_NOTIFY= #Email team when new build avialable? 0 = No, 1 = Yes
ICON_OVERLAY_ASSETS_BUNDLE="" #Path to .xcassets
TAB_USE_TIME_FOR_BUILD_NUMBER= #Use Time and date for build number or BUILD_NUMBER environment variable (created by Jenkins or Team City) true = use time, false = use BUILD_NUMBER
TAB_USE_TIME_FOR_BUILD_NUMBER=true #Use Time and date for build number or BUILD_NUMBER environment variable (created by jenkis or team city) true = use time, false = use BUILD_NUMBER
ITUNES_CONNECT_USERNAME="" #iTunes Connect login (usually email address)
ITUNES_CONNECT_TEAM_ID="" #The ID of your iTunes Connect team if you're in multiple teams https://github.com/fastlane/fastlane/issues/4301#issuecomment-253461017
ITUNES_CONNECT_PROVIDER="" #The provider short name to be used with the iTMSTransporter to identify your team
Expand Down

0 comments on commit 1f4d663

Please sign in to comment.