GithubHelp home page GithubHelp logo

objective_release's Introduction

ObjectiveRelease

As a ruby programmer used to cap deploy for deployments, I want a simple way to deploy the iOS apps I work on.

ObjectiveRelease does two things:

  • Increments your app's minor version number
  • Generates release notes based on git commits since your last release

System Requirements

  • git
  • ruby
  • bundler
  • iOS app

Usage

Install the objective_release gem:

gem install objective_release

Add a Rakefile like the following to your iOS project root:

require 'objective_release'

namespace :version do
  desc "Bump version and update release notes"
  task :bump do
    basedir = File.join(File.dirname(__FILE__), 'MyApp')
    config = File.join(basedir, "MyApp-Info.plist")       # Path to the Plist config for your iOS app
    release_notes = File.join(basedir, "RELEASE_NOTES")   # Create one of these if you don't have one

    release = ObjectiveRelease::Release.new
    release.update_bundle_version(config)
    release.update_release_notes(release_notes)
  end
end

Then from your shell, just run the rake task:

rake version:bump

Examples

Here are some examples of how your local files will change after running the rake task:

Definitely check out the code if you run into issues or can't figure out how this thing should work.

ObjectiveRelease + BetaBuilder = Easily Deploy to TestFlight

If what you really want is push-button iOS deployments (I do!), and you're a TestFlight fan:

Add a Gemfile to the root of your iOS project:

source :rubygems

gem 'betabuilder', '0.4.1'
gem 'objective_release', '0.1.7'

Then add a Rakefile to your project root:

require 'rubygems'
require 'betabuilder'
require 'objective_release'

desc "Increment the version number and deploy via TestFlight"
task :bump_and_deploy => ["version:bump", "beta:deploy"]

namespace :version do
  desc "Bump version and update release notes"
  task :bump do
    basedir = File.join(File.dirname(__FILE__), 'MyApp')
    config = File.join(basedir, "MyApp-Info.plist")
    release_notes = File.join(basedir, "RELEASE_NOTES")

    release = ObjectiveRelease::Release.new
    release.update_bundle_version(config)
    release.update_release_notes(release_notes)
  end
end

BetaBuilder::Tasks.new do |config|
  config.target = "MyApp"
  config.configuration = "Distribution"
  config.deploy_using(:testflight) do |testflight|
    testflight.api_token = "your-api-token-here"
    testflight.team_token = "your-team-token-here"
    testflight.distribution_lists = %w{TestFlight Distribution List}
    testflight.generate_release_notes do
      File.open('MyApp/RELEASE_NOTES', 'rb') {|f| f.read }
    end
    testflight.notify = true
  end
end

Then just run rake bump_and_deploy and sit back and relax while your deployment is run automatically.

See Also

Contributing

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2011 Shay Frendt. See LICENSE for details.

objective_release's People

Contributors

shayfrendt avatar

Stargazers

 avatar  avatar  avatar

objective_release's Issues

rake aborted

iĀ“m getting the following error:

Dummy git:(master) āœ— rake version:bump --trace
** Invoke version:bump (first_time)
** Execute version:bump
rake aborted!
Version number could not be incremented.
/Users/raul/.rvm/gems/ruby-1.9.3-p385/gems/objective_release-0.1.7/lib/objective_release/release.rb:41:in increment_version' /Users/raul/.rvm/gems/ruby-1.9.3-p385/gems/objective_release-0.1.7/lib/objective_release/release.rb:15:inupdate_release_notes'
/Users/raul/Desktop/Dummy/Rakefile:31:in block (2 levels) in <top (required)>' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:228:incall'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:228:in block in execute' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:223:ineach'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:223:in execute' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:166:inblock in invoke_with_call_chain'
/Users/raul/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/monitor.rb:211:in mon_synchronize' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:159:ininvoke_with_call_chain'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/task.rb:152:in invoke' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:143:ininvoke_task'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:101:in block (2 levels) in top_level' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:101:ineach'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:101:in block in top_level' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:110:inrun_with_threads'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:95:in top_level' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:73:inblock in run'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:160:in standard_exception_handling' /Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/lib/rake/application.rb:70:inrun'
/Users/raul/.rvm/gems/ruby-1.9.3-p385@global/gems/rake-10.0.3/bin/rake:33:in <top (required)>' /Users/raul/.rvm/gems/ruby-1.9.3-p385/bin/rake:19:inload'
/Users/raul/.rvm/gems/ruby-1.9.3-p385/bin/rake:19:in <main>' /Users/raul/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:ineval'
/Users/raul/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `

'
Tasks: TOP => version:bump

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.