Skip to content

How to Release the CDR

gregjan edited this page Aug 8, 2012 · 27 revisions

How to Release the CDR

This procedure covers both major and minor releases. Major releases generally come from the master branch, though we have to option of branching for release. Minor releases are performed on a release maintenance branch, such as 3.1.x.

prepare

  1. Go to a cdr folder:
  • cd cdr
  • or if no cdr folder has been cloned:
  • git clone [email protected]:UNC-Libraries/Carolina-Digital-Repository.git cdr
  • cd cdr
  1. make sure you are on the correct branch and have no outgoing/incoming changes
  • do git checkout <branch>, where branch is master or a minor release branch like 3.1.x
  • do git pull
  • do git status
  1. set the email and user name for the local git repository, if not already set
  • git config -l
  • git config user.email <your eclipse commiter email address>
  • git config user.name <your name>
  1. check license headers
  • mvn license:check
  • vim pom.xml - edit parent POM until license exclusions are up to date
  • mvn license:format - apply license header to remaining files
  • git commit
  1. create a local release branch (just creating it, not checking it out yet)
  • git branch cdr-<version>
  • This local branch will not be pushed to the remote repository. It is just a local branch used for this release process.
  1. update the checked out branch pom files to the next -SNAPSHOT version.
  • mvn versions:set -DnewVersion=<version+1>-SNAPSHOT -DgenerateBackupPoms=false (inserts new version into POMs. increment the proper version digit)
  • vim pom.xml - update the cdr-version property in parent POM (updates dependencies)
  • git commit -s -a -m "new version <version+1>-SNAPSHOT"
  • git push

deploy and tag

  1. checkout the local release branch you created above
  • git checkout cdr-<version>
  1. update checked out release branch pom files to the release version.
  • mvn versions:set -DnewVersion=<version> -DgenerateBackupPoms=false - insert release version into POMs
  • vim pom.xml - update the cdr-version property in parent POM (updates dependencies)
  1. deploy the release artifacts to Artifactory
  • mvn clean deploy
  1. commit and tag your changes
  • git commit -s -a -m "new release <version>"
  • git tag <version>

promote to GitHub

  1. push the release tag
  • git push origin <version>

cleanup

  1. remove release branch if you intend to keep the local git repository
  • git checkout <working-branch> - switch back to master or preferred branch (you cannot delete the current branch)
  • git branch -D cdr-<version>