Script to deploy iOS apps (enterprise or adhoc). Archives & exports your app as an ipa, commits and pushes your changes (git & hg), generates an html & uploads everything to a server. It can also optionally send an email when the process finishes correctly.
-
The app icon must be in an image asset for the script to be able to correctly find it and use it
-
For uploading to FTP the password must be stored in the Keychain
-
Xcode Command Line Tools. You can install them using the command:
$ xcode-select --install
-
$ pip install paramiko --user python
This is the process followed by the script, step by step:
- Creates the archive path
- Archives your app to a xcarchive file
- Exports this archive to an ipa file
- Asks you for a simple description of the changes made
- Fills the html template file and generates an html file in the archive path
- Finds the biggest icon in your image assets, and copies it to the archive path as Icon.png
- If it finds a git or mercurial repository in your project, it will add any changes, commit using your provided changes, and push
- Uploads the ipa, the html and the icon to your server
JJDeploy uses homebrew for installation. You will need to install it first if you don't have it already.
$ brew tap buscarini/formulae
$ brew install jjdeploy
Now you can run this in your project folder:
$ jjdeploy init
This creates a jjdeploy.config that you can fill with your project information.
We recommend that you use liftoff or something similar, so you can have your config file populated automatically when creating new projects.
The jjdeploy_resources folder contains all the css and html template files. JJDeploy uses the most specific resources folder it can find. You can have a copy in your project path and a global one in ~/.jjdeploy/jjdeploy_resources. If these are not found then the default copy will be used.
Finally, run jjdeploy in your project folder:
$ jjdeploy
Note that you need to store the password in the Keychain before trying to upload to an ftp server
- Open Keychain
- Tap +
- Type whatever you want as the item name (It should match KEYCHAIN_ITEM in your config file)
- Type the ftp user account (It should match FTPACCOUNT in your config file)
- Enter the ftp password
- Save
This is the command to update JJDeploy to the latest version:
$ jjdeploy update
Alternatively, you can do it manually:
$ brew update && brew upgrade jjdeploy
Be aware that until we reach version 1.0 any update might contain breaking changes, and you might need to update your existing config files. If you are unsure of what you need to change, run $ jjdeploy init in a different path and see what changes you might need.
You can run jjdeploy with these parameters:
init (Without any additional parameters: jjdeploy init). Creates a template config file with the name jjdeploy.config in the current directory
init resources (Without any additional parameters: jjdeploy init resources). This creates a local directory with the resources used in the website. This allows to have different css/image files and to customize the html
upload This will only upload a previous archive, without requiring to build and archive again.
-v (or --verbose) will display all the xcodebuild output
-email will send an email with the changes to the company email address in the script
-noemail will avoid sending the email even if the config contains the information
--version Displays the current script version
-h Displays usage instructions
jjdeploy.config stores all your project configuration. You can have multiple files, for test, release, CI, etc. $ jjdeploy init creates a default config with all the options you can tweak.
- José Manuel Sánchez (@buscarini)
- Javier Querol (@JavierQuerol)
JJDeploy is released under the MIT license. See LICENSE for details.