How to Release

sheymann edited this page Jan 4, 2015 · 2 revisions
Clone this wiki locally

Introduction

Gephi has currently no build server and use ANT for building. Netbeans Platform can now be built using Maven, but we started with ANT, we have our customized targets.

As updates can be deployed through the AutoUpdate system, there is no a critical need of a build server producing Nightly Builds. However some scripts could be written to speed-up the whole process of release.

What is AutoUpdate?

Consult the official Netbans Platform wiki.

When to release?

The question is when to make a real release and when to use the AutoUpdate system. The AutoUpdate can do many things but not everything, in particular when modules are added/removed. A real release should be done when:

  • Netbeans Platform itself has been updated
  • Modules have been removed (depends, see below)
  • Modules have been added (depends, see below)

So when modules are just updated, it's fine. If a new module is added and is a dependency of an exisitng module it's fine also. If a new module is added an no existing module depends on it, it will be ignored by the AutoUpdate system. A hack is to add this dependency to 'DesktopBranding' for example, to force the system to include the new module. Also, be careful with TopComponent persistence. That could cause exceptions when a new version if a module receives a outdated version of it's serialized parameters at startup.

Release checklist

Great help can be found on the Netbeans Platform wiki.

Update App Version

Checkout the following files and modify version name

branding/core/core.jar/org/netbeans/core/startup/Bundle.properties
branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties

Check localization

The build target automatically download the Netbeans Platform localization JARs and unzip them into the released packaged. Check this is done correctly by testing if the application starts with in French if you change the parameter in the conf file.

-J-Duser.language=fr

Javadoc packages

If new APIs are created, it's nice to have package.html file that describes it. Look at examples in existing modules.

Remove unnecessary logging

Remove forgotten logging in the console. Look for System.out.println in the codebase.

Update the Javadoc branding

Go to the build.xml file and update the doctitle and header markups in the javadoc target. Also look at the overview.html file if it's up to date.

Update AutoUpdate URL

AutoUpdate is based on consulting a XML file on the Gephi server. The URL is located in the following file:

DesktopBranding/src/org/gephi/branding/desktop/Bundle.properties

Set visibility of modules

By default, a module can be deactivated by users from the Plugin Center in Gephi. Add the following line to each module's manifest.mf file:

AutoUpdate-Essential-Module: true

Add keystore to sign NBMs

NBMs files are signed with certificate to guarantee they are official. For each module, please verify:

  • The following lines are present in the nbproject/project.properties file:
keystore=nbproject/private/keystore.ks
nbm_alias=gephi
  • The keystore.ks file is present in the nbproject/private folder
  • The private.properties file containing the password is present in the nbproject/private folder

The two files in the private folder are not on the source code repository, and kept in the hand of the team. If a NBM file can't be signed, warnings will be issued during the Create NBMs task, or the system will ask for a login/password. See also NBP wiki.

Create and upload new NBMs

  • Right-click on the Gephi project and select Create NBMs

That will create NBMs files for all modules in the build/updates folder. After the release is done,

  • Upload the NBMs files on the Gephi FTP
  • Go on Gephi Website Admin and refresh the catalog.xml

Release for Windows/Linux

  • Right-click on the project and select 'Build ZIP Distribution' or call the fowwloing ant target (with ANT >= 1.8)

ant build-zip

Look into 'dist' folder for the result. The Zip contains Windows executable and Linux script.

Make windows installer

The windows installer is done with the free tool InnoSetup. It works with a simple script file (extension .iss) which have to be modified before each release. The script is located on a bazaar branch.

  • Download and install InnoSetup
  • Get the branch content

bzr branch lp:~gephi.team/gephi/windows-installer

  • Unzip the ZIP distribution in the same directory.
  • Open the gephi-0.7.iss file with InnoSetup
  • Edit the script (see below)
  • Compile the file in InnoSetup. That will create the setup executable. Try it.

Script updates:

  • In the script, change gephi07beta.exe with the new name of the executable located in the bin directory. That is actually the app.name defined in Netbeans.
  • If it's a major version, going from 0.7 to 0.8 for example, update the AppVerName, DefaultDirName and DefaultGroupName
  • Update OutputBaseFilename by respecting the same naming convention
  • Update with the new 'app.name' where it's necessary
  • The '[InstallDelete]' at the end says what should be cleaned before installing. If it's not a major release, put here the install folders with the app.name.

Release for Mac OS X

  • Right-click on the project and select 'Build Mac OS X Application' or call the fowwloing ant target (with ANT >= 1.8)

ant build-mac

Note that the Mac OS App must be built either on Mac or Linux.

  • Right-click on the app and Show package contents. Look for the configuration file etc/gephi.conf and edit it.
  • Replace the default -J-Xms64m -J-Xmx512m by -J-Xms64m -J-Xmx256m. We lower the maximum memory on Mac because they traditionnaly have less memory than PCs.
  • Transform the APP into a DMG file by calling

hdiutil create -srcfolder gephi.app gephi.dmg

Deploy changes on AutoUpdate

This is very simple:

  • Increment the Specification Version of all modules that you need to update
  • Create NBMs for the particular module(s) or for all project (safer). Right-click on the Gephi project and select "Create NBMs".
  • Upload the NBMs files on the Gephi FTP
  • Go on Gephi Website Admin and refresh the catalog.xml

Release the Toolkit

see How to build the Gephi Toolkit. The toolkit release versions come from the trunk revision number (REVNO). Below is the content of the gephi-toolkit-0.7.REVNO-all package. Some Netbeans project files have been ignored.

-gephi-toolkit-0.7.REVNO-all
--gephi-toolkit.jar
--toolkit-javadoc.zip
--README.txt
--gephi-toolkit-demos
---nbproject
---src
---README.txt
---lib
----gephi-toolkit.jar
----toolkit-javadoc.zip
----version.txt

The package should include the demos files, which can be pulled from https://code.launchpad.net/~gephi.team/gephi/ToolkitDemos Be sure to clean the demo project and keep only source files and netbeans project files.

Improve the system

  • Add a major release notification system, to inform users they have to download a new version. Look how Netbeans is doing that.
  • Deploy the Gephi Toolkit on a Maven repository
  • Create scripts when possible