/ognivo

CLI tool for building and distributing updates for MacOS applications with the sparkle framework via AWS S3.

Primary LanguageRubyMIT LicenseMIT

Ognivo

Code Climate Build Status

CLI tool for building and distributing updates for OS X applications with Sparkle via Amazon S3.

NOTE about gem's name: ognivo is a russian word that means fire striker, so it is a device for making sparkles.

Installation

Execute:

$ gem install ognivo

Usage

Gem adds spark command-line app. The app provides following commands:

  build                Builds and packs your app into zip archive
  init                 Creates an appcast
  upload               Uploads app archive and updates appcast
  release              Builds and packs your app into zip archive

Building and Archiving

$ cd /path/to/XCodeProject
$ spark build

Ognivo will find workspace/project file and build default configuration, after that it will pack it into zip archive and save it in a current directory.

Default behavior can be overriden using these options:

-w, --workspace WORKSPACE_FILE Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)
-c, --configuration CONFIGURATION Configuration used to build
-s, --scheme SCHEME Scheme used to build app
-d, --destination DESTINATION Destination. Defaults to current directory

Preparing an appcast

First, you have to create an S3 bucket that will be used to store an appcast and update files. Then run:

$ spark init -a aws_access_key -s aws_secret_key -b bucket_name

Tool will ask a few questions to prepare an empty appcast, and then app will upload new appcast.xml file into provided bucket.

You can change default appcast file name using -c, --appcast option.

AWS credentials can also be provided via environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

Distributing an update

$ spark upload -a aws_access_key -s aws_secret_key -b bucket_name MyApp.zip

The tool will ask you for update's title, version and release notes, and then it uploads specified file and updates appcast with new version.

If you don't sign your app with your Developer Certificate, you can specify DSA private key to calculate code signature for Sparkle using -d, --dsa-private-key option. Read more about code signing here.

In order to use Sparkle's DSA build signing feature you must install openssl.

Releasing an update

Most of the time you will use release command, that builds a new version and then uploads archive.

$ spark release -a aws_access_key -s aws_secret_key -b bucket_name

The release command supports options for both build and upload commands. It will try to get application version from Xcode project settings.

Contributing

Contributions are welcome.

Thanks

Ognivo is inspired by shenzhen gem. Many thanks to @mattt for his work on such awesome tool.

Credits

Ognivo is by Anatoliy Plastinin.

License

MIT.