Last active
August 29, 2015 14:02
-
-
Save ern/fd1ab257c9657a510766 to your computer and use it in GitHub Desktop.
Sakai Release Process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Releasing sakai involves changing versions and creating tags and deploying artifacts to maven repo's. | |
* maybe a snippet why maven release plugin is a pain and can't be used see http://axelfontaine.com/blog/final-nail.html | |
- Versioning the new version | |
For this task we will leverage the maven versions plugin http://mojo.codehaus.org/versions-maven-plugin/ | |
When a branch is ready to be made a version the first thing is to update versions | |
In order to ensure all the versions were updated accuratley its important to find out how many versions there currently are with something like: | |
grep -rl "<version>10-SNAPSHOT</version>" --include=*.xml * |wc -l | |
539 | |
Then update the version using: | |
mvn versions:set -DnewVersion=10.0 -DgenerateBackupPoms=false -f master/pom.xml | |
this will update all the relevant versions of all the sakai modules to the 10.0 version but to be sure we check it with | |
grep -rl "<version>10-SNAPSHOT</version>" --include=*.xml * |wc -l | |
0 | |
relevant xml in pom: | |
<project> | |
... | |
<version>10-SNAPSHOT</version> | |
... | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>versions-maven-plugin</artifactId> | |
<version>2.1</version> | |
</plugin> | |
</plugins> | |
</build> | |
</project> | |
Finally we commit the changes to the version in all projects: | |
svn commit --include-externals -m "Update Sakai Version to 10.0" | |
- Tagging | |
The maven plugin that would typically handle this is the scm plugin http://maven.apache.org/scm/maven-scm-plugin/ | |
but currently there is an issue with this plugin and our project structuring see http://jira.codehaus.org/browse/SCM-342 | |
relevant xml in pom: | |
<project> | |
<scm> | |
<connection>scm:svn:https://source.sakaiproject.org/svn/sakai/trunk</connection> | |
<developerConnection>scm:svn:https://source.sakaiproject.org/svn/sakai/trunk</developerConnection> | |
<url>https://source.sakaiproject.org/svn/sakai/trunk</url> | |
</scm> | |
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-scm-plugin</artifactId> | |
<version>1.8.1</version> | |
<configuration> | |
<tag>${project.artifactId}-${project.version}</tag> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> | |
* insert tag script instructions | |
- Versioning the new developement version | |
using the same process as we did above update versions to the new developement version with: | |
mvn versions:set -DnewVersion=10.1-SNAPSHOT -DgenerateBackupPoms=false -f master/pom.xml | |
commit the changes to the version in all projects: | |
svn commit --include-externals -m "Update Sakai Version to 10.1-SNAPSHOT" | |
- Deploy artifacts | |
This is typically handled with the deploy plugin | |
Recently there have been discussions that sakai should only release api's to maven repositories. | |
They are possibly a few ways to handle this but we could configure the deploy plugin or possibly use profiles. | |
gpg sign the artifacts. | |
relevant area in the pom: | |
<distributionManagement> | |
<repository> | |
<id>artifact-repository</id> | |
<url>your-artifact-repo-url</url> | |
</repository> | |
</distributionManagement> | |
* Note currently there are some properties that will need to be updated manually in master currently they are: | |
<sakai.version>11-SNAPSHOT</sakai.version> | |
<sakai.kernel.version>11-SNAPSHOT</sakai.kernel.version> | |
<sakai.msgcntr.version>11-SNAPSHOT</sakai.msgcntr.version> | |
- References | |
http://maven.apache.org/plugins/index.html (Maven plguins) | |
http://mojo.codehaus.org/plugins.html (Codehaus plugins) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment