Skip to content

Commit

Permalink
Merge pull request #2 from KrauseFx/master
Browse files Browse the repository at this point in the history
upstream
  • Loading branch information
coreyfloyd committed Apr 13, 2015
2 parents 897567e + a69144a commit b86d874
Show file tree
Hide file tree
Showing 37 changed files with 706 additions and 49 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -136,7 +136,7 @@ A detailed description about how ```fastlane``` stores your credentials is avail

## Special Thanks

Thanks to all sponsors and contributors for extending and improving the `fastlane` suite:
Thanks to all contributors for extending and improving the `fastlane` suite:
- [Detroit Labs](http://www.detroitlabs.com/)
- Josh Holtz ([@joshdholtz](https://twitter.com/joshdholtz))
- Ash Furrow ([@ashfurrow](https://twitter.com/ashfurrow))
Expand Down
15 changes: 14 additions & 1 deletion docs/Actions.md
Expand Up @@ -36,7 +36,20 @@ You can run any xctool action. This will require having [xctool](https://github.
xctool :test
```

It is recommended to have the `xctool` configuration stored in a [`xctool-args`](https://github.com/facebook/xctool#configuration-xctool-args) file.
It is recommended to have the `xctool` configuration stored in a [`.xctool-args`](https://github.com/facebook/xctool#configuration-xctool-args) file.

If you prefer to have the build configuration stored in the `Fastfile`:

```ruby
xctool :test, [
"--workspace", "'AwesomeApp.xcworkspace'",
"--scheme", "'Schema Name'",
"--configuration", "Debug",
"--sdk", "iphonesimulator",
"--arch", "i386"
].join(" ")
```


### [snapshot](https://github.com/KrauseFx/snapshot)

Expand Down
4 changes: 2 additions & 2 deletions fastlane.gemspec
Expand Up @@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'aws-sdk', '~> 1.0' # Upload ipa files to S3
spec.add_dependency 'xcodeproj', '~> 0.20' # Needed for commit_version_bump action
spec.add_dependency 'xcpretty', '~> 0.1' # prettify xcodebuild output
spec.add_dependency 'cupertino', '~> 1.3', '>= 1.3.1' # for registering iOS devices with the Apple Developer Center
spec.add_dependency 'cupertino', '>= 1.3.2', '>= 1.3.1' # for registering iOS devices with the Apple Developer Center
spec.add_dependency 'terminal-notifier', '~> 1.6.2' # Mac OS X notifications
spec.add_dependency 'terminal-table', '~> 1.4.5' # Actions documentation

Expand All @@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'pem', '>= 0.4.0'
spec.add_dependency 'sigh', '>= 0.4.8'
spec.add_dependency 'produce', '>= 0.2.0'
spec.add_dependency 'cert', '>= 0.1.4'
spec.add_dependency 'cert', '>= 0.1.5'

# Development only
spec.add_development_dependency 'bundler'
Expand Down
37 changes: 36 additions & 1 deletion lib/assets/custom_action_template.rb
Expand Up @@ -6,12 +6,47 @@ module SharedValues

class [[NAME_CLASS]] < Action
def self.run(params)
params = params.first

puts "My Ruby Code!"
# puts "Parameter: #{params.first}"
# puts "Parameter Path: #{params[:first]}"
# sh "shellcommand ./path"

# Actions.lane_context[SharedValues::[[NAME_UP]]_CUSTOM_VALUE] = "my_val"
end



#####################################################
# @!group Documentation
#####################################################

def self.description
"A short description with <= 80 characters of what this action does"
end

def self.available_options
# Define all options your action supports.
# The environment variable (last parameters) is optional, remove it if you don't need it
# You can add as many parameters as you want
[
['path', 'Describe what this parameter is useful for', 'ENVIRONMENT_VARIABLE_NAME'],
['second', 'Describe what this parameter is useful for']
]
end

def self.output
# Define the shared values you are going to provide
# Example
[
['[[NAME_UP]]_CUSTOM_VALUE', 'A description of what this value contains']
]
end

def self.author
# So no one will ever forget your contribution to fastlane :) You are awesome btw!
'[Your GitHub Name]'
end
end
end
end
4 changes: 4 additions & 0 deletions lib/fastlane/action.rb
Expand Up @@ -8,6 +8,10 @@ def self.description
"No description provided".red
end

def self.details
nil # this is your change to provide a more detailed description of this action
end

def self.available_options
# Return an array of 2-3 element arrays, like:
# [
Expand Down
15 changes: 15 additions & 0 deletions lib/fastlane/actions/commit_version_bump.rb
Expand Up @@ -74,6 +74,21 @@ def self.run(params)

Helper.log.info "Committed \"#{commit_message}\" 馃捑.".green
end

def self.description
"Creates a 'Version Bump' commit. Run after `increment_build_number`"
end

def self.available_options
[
['message', 'The commit message. Defaults to "Version Bump"'],
['xcodeproj', 'The path to your project file (Not the workspace). If you have only one, this is optional']
]
end

def self.author
"lmirosevic"
end
end
end
end
20 changes: 20 additions & 0 deletions lib/fastlane/actions/crashlytics.rb
Expand Up @@ -83,6 +83,26 @@ def self.assert_valid_ipa_path!(ipa_path)
raise "No IPA file given or found, pass using `ipa_path: 'path/app.ipa'`".red
end

def self.description
"Upload a new build to Crashlytics Beta"
end

def self.available_options
[
['crashlytics_path', 'Path to your Crashlytics bundle', 'CRASHLYTICS_FRAMEWORK_PATH'],
['api_token', 'Crashlytics Beta API Token', 'CRASHLYTICS_API_TOKEN'],
['build_secret', 'Crashlytics Build Secret', 'CRASHLYTICS_BUILD_SECRET'],
['ipa_path', 'Path to your IPA file. Optional if you use the `ipa` or `xcodebuild` action'],
['notes_path', 'Release Notes'],
['emails', 'Pass email address'],
['notifications', 'Crashlytics notification option']
]
end

def self.author
"pedrogimenez"
end

private_class_method :assert_params_given!,
:assert_valid_params!,
:assert_valid_crashlytics_path!,
Expand Down
25 changes: 25 additions & 0 deletions lib/fastlane/actions/deploygate.rb
Expand Up @@ -83,6 +83,31 @@ def self.help_message(response)
Helper.log.error message.red if message
end
private_class_method :help_message

def self.description
"Upload a new build to DeployGate"
end

def self.available_options
[
['api_token', 'DeployGate API Token'],
['user', 'Target username or organization name'],
['ipa', 'Path to your IPA file. Defaults to output of xcodebuild and ipa'],
['message', 'Text for the uploaded build']
]
end

def self.output
[
['DEPLOYGATE_URL', 'URL of the newly uploaded build'],
['DEPLOYGATE_REVISION', 'auto incremented revision number'],
['DEPLOYGATE_APP_INFO', 'Contains app revision, bundle identifier, etc.']
]
end

def self.author
"tnj"
end
end
end
end
14 changes: 14 additions & 0 deletions lib/fastlane/actions/ensure_git_status_clean.rb
Expand Up @@ -16,6 +16,20 @@ def self.run(_params)
raise 'Git repository is dirty! Please ensure the repo is in a clean state by commiting/stashing/discarding all changes first.'.red
end
end

def self.description
"Raises an exception if there are uncommited git changes"
end

def self.output
[
['GIT_REPO_WAS_CLEAN_ON_START', 'Stores the fact that the git repo was clean at some point']
]
end

def self.author
"lmirosevic"
end
end
end
end
8 changes: 8 additions & 0 deletions lib/fastlane/actions/fastlane_version.rb
Expand Up @@ -19,6 +19,14 @@ def self.run(params)
def self.step_text
"Verifying required fastlane version"
end

def self.author
"KrauseFx"
end

def self.description
"Verifies the minimum fastlane version required"
end
end
end
end
11 changes: 8 additions & 3 deletions lib/fastlane/actions/frameit.rb
@@ -1,8 +1,5 @@
module Fastlane
module Actions
module SharedValues
end

class FrameitAction < Action
def self.run(params)
return if Helper.test?
Expand All @@ -24,6 +21,14 @@ def self.run(params)
FastlaneCore::UpdateChecker.show_update_status('frameit', Frameit::VERSION)
end
end

def self.description
"Adds device frames around the screenshots using frameit"
end

def self.author
"KrauseFx"
end
end
end
end
34 changes: 34 additions & 0 deletions lib/fastlane/actions/gcovr.rb
Expand Up @@ -101,6 +101,40 @@ def self.params_hash_to_cli_args(params)
end
end.compact
end

def self.description
"Runs test coverage reports for your Xcode project"
end

def self.available_options
[
['object_directory', 'Specify the directory that contains the gcov data files.'],
['output', 'Print output to this filename Keep the temporary *.gcov files generated by gcov.'],
['keep', 'Keep the temporary *.gcov files generated by gcov.'],
['delete', 'Delete the coverage files after they are processed.'],
['filter', 'Keep only the data files that match this regular expression'],
['exclude', 'Exclude data files that match this regular expression'],
['gcov_filter', 'Keep only gcov data files that match this regular expression'],
['gcov_exclude', 'Exclude gcov data files that match this regular expression'],
['root', 'Defines the root directory for source files.'],
['xml', 'Generate XML instead of the normal tabular output.'],
['xml_pretty', 'Generate pretty XML instead of the normal dense format.'],
['html', 'Generate HTML instead of the normal tabular output.'],
['html_details', 'Generate HTML output for source file coverage.'],
['html_absolute_paths', 'Set the paths in the HTML report to be absolute instead of relative'],
['branches', 'Tabulate the branch coverage instead of the line coverage.'],
['sort_uncovered', 'Sort entries by increasing number of uncovered lines.'],
['sort_percentage', 'Sort entries by decreasing percentage of covered lines.'],
['gcov_executable', 'Defines the name/path to the gcov executable].'],
['exclude_unreachable_branches', 'Exclude from coverage branches which are marked to be excluded by LCOV/GCOV markers'],
['use_gcov_files', 'Use preprocessed gcov files for analysis.'],
['print_summary', 'Prints a small report to stdout with line & branch percentage coverage']
]
end

def self.author
"dtrenz"
end
end
end
end
18 changes: 18 additions & 0 deletions lib/fastlane/actions/hipchat.rb
Expand Up @@ -87,6 +87,24 @@ def self.check_response_code(response, channel)
raise "Unexpected #{response.code} for `#{channel}'".red
end
end

def self.description
"Send a error/success message to HipChat"
end

def self.available_options
[
['', 'Hipchat API Token', 'HIPCHAT_API_TOKEN'],
['', 'Version of the Hipchat API. Must be 1 or 2', 'HIPCHAT_API_VERSION'],
['message', 'The message to post on HipChat'],
['channel', 'The room or @username'],
['success', 'Is this a success message?'],
]
end

def self.author
"jingx23"
end
end
end
end
26 changes: 26 additions & 0 deletions lib/fastlane/actions/hockey.rb
Expand Up @@ -63,6 +63,32 @@ def self.run(params)
raise 'Error when trying to upload ipa to HockeyApp'.red
end
end

def self.description
"Upload a new build to HockeyApp"
end

def self.available_options
[
['api_token', 'API Token for Hockey Access'],
['ipa', 'Path to the ipa file. Optional if you use the `ipa` or `xcodebuild` action'],
['notes', 'The changelog for this build'],
['dsym', 'Path to the dsym file. Optional if you use the `ipa` or `xcodebuild` action'],
['status', 'No description'],
['notify', 'Notify testers? 1 for yes'],
]
end

def output
[
['HOCKEY_DOWNLOAD_LINK', 'The newly generated download link for this build'],
['HOCKEY_BUILD_INFORMATION', 'contains all keys/values from the HockeyApp API, like :title, :bundle_identifier']
]
end

def self.author
"KrauseFx"
end
end
end
end
21 changes: 21 additions & 0 deletions lib/fastlane/actions/increment_build_number.rb
Expand Up @@ -55,6 +55,27 @@ def self.run(params)
raise ex
end
end

def self.description
"Increment the build number of your project"
end

def self.available_options
[
['build_number', 'specify specific build number (optional, omitting it increments by one)'],
['xcodeproj', 'optional, you must specify the path to your main Xcode project if it is not in the project root directory']
]
end

def self.output
[
['BUILD_NUMBER', 'The new build number']
]
end

def self.author
"KrauseFx"
end
end
end
end

0 comments on commit b86d874

Please sign in to comment.