allegro_release tool
allegro_release is a dedicated tool that helps in releasing a pod.
Prerequests
In order to properly use allegro_release you need to install atlassian-stash gem:
gem install atlassian-stash
After installation, run stash configure to configure Stash instance (you will have to run stash configure every time you change your password, which currently is once per month). The following prompts should appear:
Bitbucket Server Username: <your_username> (go to "View Profile" in upper-right corner of Stash)
Bitbucket Server Password (optional): <your_password>
Bitbucket Server URL: https://stash.allegrogroup.com/
Remote (optional): <leave_empty>
Create a git alias 'git create-pull-request'? n
Installation of allegro_release
Run:
gem install allegro_release
Procedure flow
If you don't want to use allegro_release just follow the steps in What it does? sections.
Step 1
Run command in root of repository where .podspec is.
allegro_release (major|minor|patch)
majorincreases major (X.0.0) version of pod.minorincreases minor (0.X.0) version of pod.patchincreases patch (0.0.X) version of pod.
What it does?
- Checkouts
developbranch and pulls changes from repository. - Creates new branch named
release_<version>. - Bumps the version in
.podspecaccordingly to chosen option. - Updates
CHANGELOG.mdif available in the repository. Precisely, the tool is updating release date of release version and adds placeholders for next version on top of the file.CHANGELOG.mdmust follow the convention (explained below) used in repositories in order for this step to work. - Checks if
.podspecfile is valid viapod lib lint. - Commits all the changes. During this step
allegro_releaseis asking the user for release issue JIRA ID. - Pushes the branch to the remote repository.
- Creates pull request from
release_<version>todevelop.
CHANGELOG.md convention
File line numbers are on the left.
1. # CHANEGLOG
2.
3. ## Version X.X.X
4. #### Unreleased
5.
6. - (added) # Some unreleased changes
7.
8. ## Version 2.2.2
9. ### Released 01.01.2016
10.
11. - (modified) # Some released changes and the rest of CHANGELOG.md.
Step 2
After merging pull request that was created automatically in step 1, run command in root of repository where .podspec is.
allegro_release to_master
What it does?
- Checkouts
release_<version>branch and pulls changes from repository. - Creates pull requests from
release_<version>tomaster.
Step 3
After merging pull request that was created automatically in step 2, run command in root of repository where .podspec is.
allegro_release finish
What it does?
- Checkouts
masterbranch and pulls changes from repository. - Adds tag to
masterwith updated version. - Pushes
.podspecto spec repository (this repository).