Skip to content
Michael Wetter edited this page Mar 17, 2013 · 26 revisions

================ Making a release

Making a new release requires administrator permission.


Modelica library

To make a release of the Modelica library, proceed as follows:

#. Merge your changes to the trunk. #. Update the first lines in the file Buildings/package.mo, such as

.. code-block:: modelica

  annotation (
  version="1.0",
  versionBuild=2,
  versionDate="2011-11-04",
  dateModified = "$Date: 2011-12-08 15:54:40 -0800 (Thu, 08 Dec 2011) $",
  uses(Modelica(version="3.2")),
  conversion(
   from(version="0.12", 
        script="modelica://Buildings/Resources/Scripts/Dymola/ConvertModelica_from_0.12.0_to_0.13.mos")),

..

Use versionBuild=0 prior to any release, versionBuild=1 for the first release of a version, and increment it for every release of a bug fix that is compatible with previous releases of the same version number.

The keyword versionDate is only changed when version changes. A new versionBuild does ''not'' change versionDate, but it does update dateModified in the format above, which can be processed by Modelica tools.

  1. Make sure that the script ConvertModelica_from_0.12.0_to_0.13.mos contains all update commands. #. Run the script bin/checkRelease.py to check for invalid syntax. #. Run the unit tests as described above. #. Run the script makeRelease.py with arguments such as

    .. code-block:: bash

    makeRelease.py --version 1.0 --build 1

  2. Copy the files to the web server using the script postBuildingsTagToSrg.sh. #. Update http://simulationresearch.lbl.gov/modelica/Download. #. Update the web link using

    .. code-block:: bash

    cd /usr/local/www/simulationresearch/modelica/releases rm latest ln -s vX.Y_buildZ latest

  3. Prepare next development version by:

    a. Adding a new ReleaseNotes package to Buildings/package.mo. Use this template <ReleaseNotes-Template>_. b. Update in Buildings/package.mo the section

    .. code-block:: modelica

      annotation (
      version="1.1",
      versionBuild=0,
      versionDate="2011-11-04",
      dateModified="2011-12-07 23:20:00Z",
      uses(Modelica(version="3.2")),
    

    c. Update in the same file

    .. code-block:: html

      annotation (Documentation(info="<html>
       <p>
       This section summarizes the changes that have been performed
       on the Buildings library.
       </p>
       <p>
       <ul>
       <li> 
       <a href=\"modelica://Buildings.UsersGuide.ReleaseNotes.Version_1_4_build1\">
       Version 1.4 build1</a>(xxx, 2013)</li>
       </li>
    

User Guide

To update the user guide, proceed as follows:

#. Type

.. code-block:: bash

  cd vX.Y_buildZ/bie/userGuide
  1. Either type

    .. code-block:: bash

    make dist

    ..

    or

    .. code-block:: bash

    make html make linkcheck make copytowww

    ..

    The second form can be used if make linkcheck reports broken links because links point to http://simulationresearch.lbl.gov/modelica/releases/latest/help and hence files that were added to the current release may not yet be posted under latest.


BuildingsPy library

To update the BuildingsPy python package, proceed as follows:

#. In BuildingsPy/setup.py, update the version number in the section

.. code-block:: python

  setup(
   name = "buildingspy",
   version = "1.1.0",
  1. Update the file BuildingsPy/CHANGES.txt, in particular, include the release date as

    .. code-block:: python

    BuildingsPy Changelog

    Version 1.1.0, July 26, 2012 -- Release 1.1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    • Added ...
  2. In doc/source/conf.py, update the version numbers on the lines

    .. code-block:: bash

    The short X.Y version.

    version = "1.1"

    The full version, including alpha/beta/rc tags.

    release = "1.1.1"

  3. Set environment variables and delete temporary files by running from bie/BuildingsPy the commands

    .. code-block:: bash

    export PYTHONPATH=${PYTHONPATH}:pwd find . ( -name '*~' -or -name '.DS_Store' ) -delete

  4. Run

    .. code-block:: bash

    make dist

  5. To copy the files to the server, run

    .. code-block:: bash

    postBuildingsPyToWeb.sh