Skip to content

Instantly share code, notes, and snippets.

@dpgraham
Last active February 20, 2019 21:20
Show Gist options
  • Save dpgraham/c2010384bee7f7c0c3e16bdbf1631d97 to your computer and use it in GitHub Desktop.
Save dpgraham/c2010384bee7f7c0c3e16bdbf1631d97 to your computer and use it in GitHub Desktop.
Appium Release Process

Appium release process

Creating release branch

Follow these steps when we're ready to start the process for a minor release (let's call it X.Y where X is the major version and Y is the forthcoming minor version) and we want publish the first release candidate.

  1. Checkout the latest master branch git checkout master && git pull origin master
  2. Create a branch called X.Y git checkout -b X.Y
  3. Do a fresh install of the dependencies npm run clean
  4. Update the version in package.json using a release candidate version schema "version": "X.Y.0-rc.0"
  5. Create an npm-shrinkwrap.json file npm shrinkwrap
  6. Commit and push the package.json and shrinkwrap file git commit -a -m 'vX.Y.0-rc.0' && git push origin X.Y
  7. Follow the "Publishing a release candidate" steps to publish the first release candidate, vX.Y.0-rc.1
  8. Follow the "Changelog" steps get started on updating the CHANGELOG.md to reflect the changes between the upcoming minor release vX.Y.0 and whatever the latest published release was

Changelog

Follow these steps to update CHANGELOG.md

  1. Checkout the latest master git checkout master && git pull origin
  2. Let X.Y.Z be the latest release and X'.Y'.Z' be the forthcoming release
  3. Checkout a branch for updating the changelog git checkout -b changelog-X'.Y'.Z'
  4. Compare the npm-shrinkwrap.json in X'.Y'.Z' to the npm-shrinkwrap.json in X.Y.Z (e.g.: https://github.com/appium/appium/compare/v1.10.0...v1.11.1 under Files Changed look at npm-shrinkwrap.json)
  5. Update the CHANGELOG.md to reflect the changes (this will require looking at the commit history of Appium first party sub-dependencies and enumerating the changes since the last release)
  6. Commit and push the changes to the changelog branch and make a pull request. Let other Appium maintainers review it

Updating a dependency in release branch

Follow these steps when there's a new version of an Appium dependency (let's call it <PACKAGE_NAME>@<PACKAGE_VERSION) that needs to be added to a patch release, and the change is very urgent. (So urgent that it can't wait for the next minor release)

  1. Checkout the release branch and make sure it's on the latest commit git checkout X.Y && git pull origin X.Y
  2. Install the dependencies using npm ci Do not use npm install, it does not respect shrinkwrap
  3. Update the dependency npm install PACKAGE_NAME@PACKAGE_VERSION
  4. This should update the package.json by increasing the minimum version to PACKAGE_VERSION and will update npm-shrinkwrap.json by setting the pinned dependency to PACKAGE_VERSION (and will also update any sub-dependencies that were affected by the update)
  5. Commit and push the package.json and shrinkwrap file git commit -a -m 'Update PACKAGE_NAME to PACKAGE_VERSION' && git push origin X.Y
  6. Make a new release candidate

Publishing a release candidate

Follow these steps when we're ready to publish the latest contents of a release branch, X.Y, as a release candidate

  1. Checkout the release branch and make sure it's on the latest commit (git checkout X.Y && git pull origin X.Y)
  2. Install the dependencies using npm ci (important: Do not use npm install, it does not respect shrinkwrap)
  3. Update the version in package.json and npm-shrinkwrap.json by bumping up the release candidate number by one (e.g.: "version": "v1.11.2-rc.1 would become "version": "v1.11.2-rc.2")
  4. Commit and push the package.json and npm-shrinkwrap.json (git commit -a m vX.Y.Z-rc.A && git push origin X.Y)
  5. Create a git tag for this release candidate using the version (git tag vX.Y.Z-rc.A && git push --tags origin)
  6. Wait for continuous integration to pass before publishing and do any necessary last minute local testing
  7. Publish this to the rc channel (IMPORTANT!!!) (npm publish --tag=rc)
  8. To test the release candidate, install it with npm install -g appium@rc

Publishing a minor or patch release

Follow these steps when we've adequately tested the latest release candidate on release branch X.Y and we're ready to "graduate" it to being a production-ready minor or patch release

  1. Checkout the release branch and make sure it's on the latest commit (git checkout X.Y && git pull origin X.Y)
  2. Make sure the latest commit is tagged as a release candidate. If it isn't follow the "Publishing a release candidate" steps
  3. Do clean install of dependencies using npm ci (important: Do not use npm install, it does not respect shrinkwrap)
  4. Update the version in package.json and npm-shrinkwrap.json by cutting out the rc portion (e.g.: "version": "v1.11.2-rc.2" would become "version": "v1.11.2")
  5. Commit and push the package.json and npm-shrinkwrap.json (git commit -a m vX.Y.Z && git push origin X.Y)
  6. Create a git tag using the version (git tag vX.Y.Z && git push --tags origin)
  7. Update the "Changelog"
  8. Wait for continuous integration to pass and do any necessary last minute local testing before publishing
  9. Publish to NPM: npm publish
  10. To test the release, install it with npm install -g appium
  11. Update the version in package.json and npm-shrinkwrap.json back to being a release candidate for the next patch (e.g.: "version": "v1.11.3" becomes "version": "v1.11.4-rc.0")
  12. Commit and push the package.json and npm-shrinkwrap.json changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment