Version 6 (modified by 14 years ago) (diff) | ,
---|
Releasing Applications
Creating a new release
if you are just updating the current release, you can skip this
Update Build Version
First, open ant/include/utils.xml in Eclipse. Run one of the following targets to update the build version:
- update.major.version - updates the major (first) version. For example, this will update from 1.5.2 to 2.0.0
- update.minor.version - updates the major (first) version. For example, this will update from 1.5.2 to 1.6.0
- update.build.number - (only do this when updating the current release) updates the build number. For example, this will update from 1.5.2 to 1.5.3
Commit the newly modified file ant/include/build.version to trunk.
Create a release branch
You should then create a branch for this release. The branch should be created in the branches/releases directory with the name "release_<major>.<minor>.x".
For example, for version 1.0.0, the branch branches/releases/release_1.0.x was created.
Update ServerPrefs
Next, you must update the server preferences class in the new branch, and commit it to SVN. This tells various parts of the OpenSHA project that this is a release branch, and to use the "stable" server URLs/ports.
In Eclipse, open the class ServerPrefUtils in org.opensha.commons.util . Find this line:
public static final ServerPrefs SERVER_PREFS = ServerPrefs.DEV_PREFS;
And change it to:
public static final ServerPrefs SERVER_PREFS = ServerPrefs.PRODUCTION_PREFS;
Commit this modified file to your release branch.
Setup Tomcat production dir
SSH into opensha@opensha.usc.edu then navigate to the Tomcat development build directory (for more information see Tomcat Configuration):
kevin@milner:~$ ssh opensha@opensha.usc.edu Last login: Wed Aug 11 14:09:07 2010 from milner.usc.edu [1:opensha] ~: cd /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF
Switch to your new release branch. For example, to switch to releases/release_1.0.x : (you'll have to replace this with your new release branch!)
[2:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF: ./scripts/svn/switch_to_branch.sh releases/release_1.0.x switching to branch releases/release_1.0.x at https://source.usc.edu/svn/opensha/branches/releases/release_1.0.x At revision 6959.
Then rebuild the project:
[3:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF: ./rebuild.sh
Then restart Tomcat:
[4:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF: cd ant/ [5:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF/ant: ./runAnt.sh cc-build-test.xml restart.tomcat
Updating the current release
if you just created a new release above, you can skip this To update the current release, first make sure all changes are in the release branch. If the changes that you need were developed in trunk, you'll need to merge the change into the release branch (and the commit it). If the change was made in the release branch and it's something you want to keep, you should merge it back to trunk.
You should update the build number in the release branch as well, then commit the change. See Update Build Version above.
Once the updates are in the release branch on SVN, you'll need to update the checked out copy on the server. SSH into opensha@opensha.usc.edu then navigate to the Tomcat development build directory (for more information see Tomcat Configuration):
kevin@milner:~$ ssh opensha@opensha.usc.edu Last login: Wed Aug 11 14:09:07 2010 from milner.usc.edu [1:opensha] ~: cd /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF
Then rebuild the project:
[2:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF: ./rebuild.sh
Building the applications
Once the Tomcat directory is all setup and updated, it's time to build the applications!
SSH into opensha@opensha.usc.edu then navigate to the "ant" sub-directory of the Tomcat development build directory (for more information see Tomcat Configuration):
kevin@milner:~$ ssh opensha@opensha.usc.edu Last login: Wed Aug 11 14:09:07 2010 from milner.usc.edu [1:opensha] ~: cd /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF/ant
Build the applications using the MultiAppBuilder.xml ant build file's "build.dist" target:
[2:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF/ant: ./runAnt.sh MultiAppBuilder.xml build.dist Buildfile: MultiAppBuilder.xml ... BUILD SUCCESSFUL Total time: 4 minutes 6 seconds
Then build the jar distributions using the CompleteJar.xml ant build file's "build.dist" target:
[3:opensha] /usr/local/tomcat/default/webapps/OpenSHA/WEB-INF/ant: ./runAnt.sh CompleteJar.xml build.dist Buildfile: CompleteJar.xml ... BUILD SUCCESSFUL Total time: 1 minute 37 seconds
And that's it!