- in JIRA, move your ticket to "In Progress"
- make sure your current branch is clean:
git status
- checkout the latest release:
git checkout [release_branch_name]
- pull the upstream changes on the latest release branch:
git pull origin [release_branch_name]
- create and checkout a working branch off of the release:
git checkout -b [working_branch_name]
- do your work on the branch
- when work is finished, stage your changes:
git add .
- commit the staged changes:
git commit -m 'descriptive commit message'
- make sure your branch is clean:
git status
- if so, checkout the latest release branch:
git checkout [release_branch_name]
- pull the upstream changes on the latest release branch:
git pull origin [release_branch_name]
- checkout your working branch again:
git checkout [working_branch_name]
- rebase your working branch against the release branch:
git rebase -i [release_branch_name]
- after rebase, push your working branch upstream:
git push origin [working_branch_name]
- on Github, create a pull request to merge your working branch into the release branch
- in JIRA, move your ticket into "In Review"
- let someone know about the pull request and they will either reject or merge it
- If the pull request is rejected, then it should be closed and the issues that caused the rejection should be fixed on an rc branch. You can create an rc branch like this:
git checkout [working_branch_name]
thengit checkout -b [working_branch_name-rc1]
- Go through the normal workflow with the new rc branch (i.e. 6 through 15 above) and you will have a new pull request ready for review
- once merged, the person who merged it will update your JIRA ticket to "Merged" status
- Once a release has gone through QA and is ready to deploy, checkout the branch:
git checkout [release_branch_name]
- Pull the release branch from remote to make sure you have all upstream changes:
git pull origin [release_branch_name]
- Edit
package.json
and update theversion
entry to match the release number - Add and commit that change:
git commit -am 'bumped version number to [foo]'
- Push the change upstream:
git push origin [release_branch_name]
- Tag the commit:
git tag [release_branch_name]
- Push the tag upstream:
git push origin tags/[release_branch_name]
- Checkout master:
git checkout master
- Pull master from upstream:
git pull origin master
- Merge the latest release into master:
git merge [release_branch_name]
- Push master upstream:
git push origin master
- Create and checkout the next release branch:
git checkout -b [next_release_branch_name]
- Push the next release branch upstream:
git push origin [next_release_branch_name]
- Send a @channel message to slack to let everyone know that the next release branch is there
- Create a release in JIRA that matches the next branch name: Releases -> Manage Versions
- Move all tickets not marked "Done" in the current release to the next release: Issues -> View All Issues and Filters
- Run a query to get all of the relevant tickets:
project = LOOM AND fixVersion = [release_branch_name] AND status != "Done"
- Bulk update tickets to move to the next version: Tools -> Bulk Operation -> Select All Tickets -> Edit Issues -> Change Fix Version -> Replace All With -> [next_release_branch_name]
- Add a Quick Filter to the board for the next release and delete the Quick Filter for the previous release: Board -> Configure -> Quick Filter
- If your rebase is unsuccessful, git will give you a message like
could not apply xxxx ...
. This indicates a merge conflict with one or more files. Rungit status
to see a list of files that have merge conflict issues. These will be the files in red. Complete steps 2 and 3 below for each file in red: - Open the file in a text editor and resolve the conflict by merging the conflicting code together. BE SURE to delete the extra markup that git added (i.e.
<<<<<< HEAD
,==========
and<<<<<<< branch-name-foo
) - Once the conflict is resolved for that file, you can notify git by running
git add <file_name>
- Once this is done for all conflicting files (i.e. you can run a
git status
and nothing shows up in red) then you can rungit rebase --continue
- git should tell you that the rebase has completed successfully, and so you can continue with the normal workflow
Quit the LOOM process
Close out of your files / text editor