Update files for CD

This commit is contained in:
Bob Sun 2017-03-28 10:40:31 -07:00
parent d92e580d45
commit b72f7e3eb1
5 changed files with 67 additions and 23 deletions

View file

@ -1,4 +1,9 @@
language: objective-c language: objective-c
osx_image: xcode8.2 osx_image: xcode8.2
branches:
only:
- develop
before_install:
- echo -e "machine github.com\n login $GITHUB_ACCESS_TOKEN" >> ~/.netrc
script: script:
- ./fastlane/travis.sh - ./fastlane/travis.sh

View file

@ -21,28 +21,58 @@ platform :ios do
carthage(platform: "iOS") carthage(platform: "iOS")
end end
desc "Travis"
lane :travis do
test
beta
end
desc "Runs all the tests" desc "Runs all the tests"
lane :test do lane :test do
scan(scheme: "pass") scan(
scheme: "pass",
device: "iPhone 7"
)
end end
desc "Submit a new Beta Build to Apple TestFlight" desc "Submit a new Beta Build to Apple TestFlight"
desc "This will also make sure the profile is up to date" desc "This will also make sure the profile is up to date"
lane :beta do lane :beta do
# match(type: "appstore") # more information: https://codesigning.guide create_keychain(
ensure_git_status_clean name: ENV["MATCH_KEYCHAIN_NAME"],
password: ENV["MATCH_KEYCHAIN_PASSWORD"],
default_keychain: true,
unlock: true,
timeout: 3600,
add_to_search_list: true
)
match(
type: "appstore",
keychain_name: ENV["MATCH_KEYCHAIN_NAME"],
keychain_password: ENV["MATCH_KEYCHAIN_PASSWORD"],
readonly: true
)
# ensure_git_status_clean
increment_build_number( increment_build_number(
build_number: latest_testflight_build_number + 1, build_number: latest_testflight_build_number + 1,
xcodeproj: "pass.xcodeproj" xcodeproj: "pass.xcodeproj"
) )
commit_version_bump(xcodeproj: "pass.xcodeproj") # commit_version_bump(xcodeproj: "pass.xcodeproj")
push_to_git_remote # push_to_git_remote
gym(scheme: "pass") # Build your app - more options available gym(scheme: "pass")
testflight pilot(skip_waiting_for_build_processing: true)
# pilot(skip_waiting_for_build_processing: true) mailgun(
postmaster: ENV["MY_POSTMASTER"],
# sh "your_script.sh" apikey: ENV["MY_API_KEY"],
# You can also use other beta testing services here (run `fastlane actions`) to: ENV["DESTINATION_EMAIL"],
from: ENV["EMAIL_FROM_NAME"],
reply_to: ENV["EMAIL_REPLY_TO"],
subject: "A new build of Pass for iOS has been uploaded",
success: true,
app_link: "https://github.com/mssun/passforios",
ci_build_link: "https://travis-ci.org/mssun/passforios",
message: "A new build has been uploaded by Travis CI.",
)
end end
desc "Deploy a new version to the App Store" desc "Deploy a new version to the App Store"
@ -57,18 +87,9 @@ platform :ios do
# You can define as many lanes as you want # You can define as many lanes as you want
after_all do |lane| after_all do |lane|
# This block is called, only if the executed lane was successful
# slack(
# message: "Successfully deployed new App Update."
# )
end end
error do |lane, exception| error do |lane, exception|
# slack(
# message: exception.message,
# success: false
# )
end end
end end

9
fastlane/Matchfile Normal file
View file

@ -0,0 +1,9 @@
git_url "https://github.com/mssun/certificates-passforios.git"
type "development" # The default type, can be: appstore, adhoc, enterprise or development
# app_identifier ["tools.fastlane.app", "tools.fastlane.app2"]
# username "user@fastlane.tools" # Your Apple Developer Portal username
# For all available options run `fastlane match --help`
# Remove the # in the beginning of the line to enable the other options

View file

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
gem update fastlane gem update fastlane
fastlane test if [ "$TRAVIS_PULL_REQUEST" == "true" ]; then
fastlane test;
else
fastlane travis;
fi
exit $? exit $?

View file

@ -379,7 +379,7 @@
DC917BD21E2E8231000FDF54 = { DC917BD21E2E8231000FDF54 = {
CreatedOnToolsVersion = 8.2.1; CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 4WDM8E95VU; DevelopmentTeam = 4WDM8E95VU;
ProvisioningStyle = Automatic; ProvisioningStyle = Manual;
}; };
}; };
}; };
@ -732,6 +732,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.mssun.passforios; PRODUCT_BUNDLE_IDENTIFIER = me.mssun.passforios;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "893c10b3-79b1-46f7-914a-e625bf10d665";
PROVISIONING_PROFILE_SPECIFIER = "match Development me.mssun.passforios";
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/pass/Helpers/Objective-CBridgingHeader.h"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/pass/Helpers/Objective-CBridgingHeader.h";
SWIFT_VERSION = 3.0; SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
@ -744,7 +746,7 @@
baseConfigurationReference = AEAD6B31EAF5D061447A68CC /* Pods-pass.release.xcconfig */; baseConfigurationReference = AEAD6B31EAF5D061447A68CC /* Pods-pass.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 2; CURRENT_PROJECT_VERSION = 2;
DEFINES_MODULE = NO; DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = 4WDM8E95VU; DEVELOPMENT_TEAM = 4WDM8E95VU;
@ -764,6 +766,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.mssun.passforios; PRODUCT_BUNDLE_IDENTIFIER = me.mssun.passforios;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "aefeea85-1194-4db2-9ce4-fb9995e2fdff";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore me.mssun.passforios";
SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/pass/Helpers/Objective-CBridgingHeader.h"; SWIFT_OBJC_BRIDGING_HEADER = "$(SRCROOT)/pass/Helpers/Objective-CBridgingHeader.h";
SWIFT_VERSION = 3.0; SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
@ -781,6 +785,7 @@
DC13B1561E8640810097803F /* Release */, DC13B1561E8640810097803F /* Release */,
); );
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
}; };
DC917BCE1E2E8231000FDF54 /* Build configuration list for PBXProject "pass" */ = { DC917BCE1E2E8231000FDF54 /* Build configuration list for PBXProject "pass" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;