This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private_lane :prepare_certificates do |options| | |
sh("base64 -D -o Certificates.p12 <<< \"#{ENV['APPLE_CERTIFICATE']}\"", log: false) | |
create_keychain( | |
name: "default_keychain", | |
default_keychain: true, | |
unlock: true, | |
password: "default" | |
) | |
import_certificate( | |
certificate_path: "fastlane/Certificates.p12", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String { | |
let calendar = NSCalendar.currentCalendar() | |
let now = NSDate() | |
let earliest = now.earlierDate(date) | |
let latest = (earliest == now) ? date : now | |
let components:NSDateComponents = calendar.components([NSCalendarUnit.Minute , NSCalendarUnit.Hour , NSCalendarUnit.Day , NSCalendarUnit.WeekOfYear , NSCalendarUnit.Month , NSCalendarUnit.Year , NSCalendarUnit.Second], fromDate: earliest, toDate: latest, options: NSCalendarOptions()) | |
if (components.year >= 2) { | |
return String.localizedStringWithFormat(NSLocalizedString("%d years ago", comment: ""), components.year) | |
} else if (components.year >= 1){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for an "svn pristine text not present" error like this: | |
# svn: E155010: Pristine text 'd6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8' not present | |
# you can delete the file and retrieve it with svn up | |
# (if you have local modifications, make up your own plan) | |
# - | |
# Run this script from the root of the working copy. | |
# It retrieves the file that's causing the error from wc.db | |
# usage example : ./svn-pristine-find.sh d6612ee6af5d9fb4459cbe7e2e8e18f7fb4201f8 |