Coder Social home page Coder Social 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.

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.