You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Since our website only contains static information, we need to update the website every time a new release is published.

The code for our website is maintained in the $REEF_HOME/website directory, and thus updating the website generally follows the same process of creating a pull request on GitHub for some new feature or bug fix. Create a branch for the new website, make local changes, and then generate a pull request. There is one additional thing to do: publish the website contents on Apache svn. Detailed explanations on specific tasks, including the publishing step, are described below.

 

Adding new javadoc files

For each release, we are providing the corresponding Java API via javadoc. Run the following command at $REEF_HOME of a new release:

$ mvn javadoc:aggregate

HTML files will be generated under $REEF_HOME/target/site/apidocs. Move all files and folders from the new release's $REEF_HOME/target/site/apidocs to your PR branch's $REEF_HOME/website/target/staging/site/apidocs/$VERSION_NUM. For example, if the new release version is 0.14.0, then you would first run 'mvn javadoc:aggregate' at $REEF_HOME of the apache-reef-0.12.0 source code. Then, you should move the generated files and folders to $REEF_HOME/website/target/staging/site/apidocs/0.14.0 of the reef source code (the branch you created). They will be uploaded with the new website content, during the publishing step described below.

 

Adding a link to the new API

Adding the javadoc files is not enough; a link that points to the API must be shown on the website. A new link should be added to the $REEF_HOME/website/src/site/site.xml file. Search for the item tag list where previous API links are listed. Add a new link below the previous links, such as:

 <item name="0.14.0 API" href="apidocs/0.14.0/index.html"/>

The new link should appear on the left sidebar, together with the other links.

 

 

Adding a link to the new source code (downloads)

Open $REEF_HOME/website/src/site/resources/js/release.js and you'll see two Javascript dictionary variables: releaseDirect and releaseMirror. Add a line to each variable that refers to the new version's downloadable link and closest mirror, respectively.

var releaseDirect = {
    "0.10.0-incubating": "http://www.apache.org/dist/reef/0.10.0-incubating/apache-reef-0.10.0-incubating.tar.gz",
    "0.11.0-incubating": "http://www.apache.org/dist/reef/0.11.0-incubating/apache-reef-0.11.0-incubating.tar.gz",
    "0.12.0-incubating": "http://www.apache.org/dist/reef/0.12.0-incubating/apache-reef-0.12.0-incubating.tar.gz",
    "0.13.0-incubating": "http://www.apache.org/dist/reef/0.13.0-incubating/apache-reef-0.13.0-incubating.tar.gz",
    "0.14.0": "http://www.apache.org/dist/reef/0.14.0/apache-reef-0.14.0.tar.gz"
};


var releaseMirror = {
    "0.10.0-incubating": "http://www.apache.org/dyn/closer.cgi/reef/0.10.0-incubating",
    "0.11.0-incubating": "http://www.apache.org/dyn/closer.cgi/reef/0.11.0-incubating",
    "0.12.0-incubating": "http://www.apache.org/dyn/closer.cgi/reef/0.12.0-incubating",
    "0.13.0-incubating": "http://www.apache.org/dyn/closer.cgi/reef/0.13.0-incubating",
    "0.14.0": "http://www.apache.org/dyn/closer.cgi/reef/0.14.0",
};

 

 

Modifying the Downloads page to display latest version by default

Open $REEF_HOME/website/src/site/markdown/downloads.md and locate the following search tag:

<select id="selectRelease" onchange="setReleaseLink()">
    <option value="0.14.0" selected="selected">0.14.0</option>
    <option value="0.13.0-incubating">0.13.0-incubating</option>
    <option value="0.12.0-incubating">0.12.0-incubating</option>
    <option value="0.11.0-incubating">0.11.0-incubating</option>
    <option value="0.10.0-incubating">0.10.0-incubating</option>
</select>

Add a new option tag for the new release, and make that one the 'selected' one, while removing the selected attribute from the old release. This way, the select tag will display the new release by default.

New committers

The list of committers will change throughout the development of REEF. You can fix the lists by modifying $REEF_HOME/website/src/site/apt/team.apt. It shouldn't be hard to locate the list. Add (or remove) a new line in the following manner:

   jsjason   |  Joo Seong (Jason) Jeong | Seoul National University |
*------------*--------------------------*---------------------------*

The new committer should appear in the committer list. One thing to note: the ID column refers to a committer's Apache ID, not GitHub ID. Take a look at the ASF Committers page to check a committer's Apache ID.

 

Testing the website before publish

Before you actually publish the website publicly, you should (must!) generate and take a look at the actual HTML files and examine whether the intended changes were made correctly. Run the following command at $REEF_HOME/website:

$ mvn site:site

HTML files will be generated in the $REEF_HOME/website/target/staging/site directory. Open index.html and navigate through the files to your heart's content. One thing to note: links that point to past API pages will seem to be broken, since the website code doesn't automatically generate those files. Don't worry though; they should work fine on the Apache svn server.

 

Publishing the website

Run the publish script in $REEF_HOME/website:

$ ./publish.sh

Enter your Apache ID and password for authentication, and provide a short commit message (this commit message is for Apache svn, not GitHub). Make sure you run the script at $REEF_HOME/website; otherwise, the publish may not work correctly. This step may either take more than ten minutes (when uploading new javadoc API files), or less than one minute (no new API files).

  • No labels