Skip to content

Development Releasing

Fernando Dodino edited this page Nov 26, 2019 · 21 revisions

Releasing Wollok

Maven Structure

We have a particular maven artifact called org.uqbar.wollok.releng (Release Engineering) which is basically a parent pom that includes all the modules and has the global configuration for all projects. That has for example the reference to the target platform (all plugins that we will be distributing), etc.

This artifact is therefore the entry point to perform all the tasks like running the tests or generating a build / release.

Build

Wollok build is headless through maven and tycho plugin. The build produces 3 different artifacts:

  • Update Site: to be published through HTTP and accessed by eclipse applications to install Wollok in your own eclipse
  • WDK: a tar.gz file which only contains the interpreter, the checker and some command line tools but not the IDE.
  • Products: the IDE + WDK for all SO and architectures.

Releasing means uploading this artifacts to make them publicly available for download. For that we are using an FTP server. Update sites are no different from the other artifacts. They are just files and folders that need to be exposed by a webserver.

Maven Profiles

The current maven build won't create neither publish this artifacts. To do that you must run maven with two different profiles

  • uploadRepo: creates the update sites and publish them.
  • uploadProducts: creates the standalone products (all architectures), plus the WDKs and publish them.

So a sample build would be

cd org.uqbar.project.wollok.releng
mvn clean install -P "uploadRepo,uploadProducts"

NOTICE: you are not supposed to perform this command locally in your machine. It will actually fail if you don't have the correct user + password for the FTP in your settings.xml. In the next section we will see that Travis is already setup to execute this automatically

Travis CI / CD

Travis will do different things depending on the branches/tags

  • dev branch: will create and publish the update site under the specific URL http://update.uqbar.org/wollok/dev
  • tags with the form vX.Y.Z: will create a formal "release" by publishing all three artifacts (wdk, update sites and products. The update site URL for this is http://update.uqbar.org/wollok/stable
  • any other branch: will just build (compile, and tests) but won't create neither publish the artifacts

Tag convention

In order to release and publish the artifacts you must create a tag with the following convention

  vX.Y.Z

For example

  v1.2.0

Releasing

So basically to release is to run maven install using our specific profiles. And Travis already knows how to do this automatically when we push a tag.

So TO RELEASE YOU JUST NEED TO DO THE FOLLOWING:

(Note: Eventually this may be done automatically by maven release plugin. But currently that is not working so here we are like doing the release manually)

# As we work on dev branch 
# 1) Go to github and create a new PR to merge "dev" -> "master" with title "Releasing v1.2.0" (for example).
# 2) Wait for CI to pass
# 3) Merge PR (don't delete dev branch)

# update
git co master
git pull

# update versions, in root folder of wollok development branch
changeVersions.sh 1.2.0    # wait a bit since changing Maven files takes a long time
git add .
git ci -m "Releasing v1.2.0"
git push

# tag
git tag v1.2.0
git push --tags

Then wait for Travis to run the build. You should be able to download the new packages and install from update sites.

Notes:

  • Replace "1.2.0" with the actual version you want to release. In this case the poms had the "1.2.0-SNAPSHOT" version, so you MUST use "1.2.0" (notices that this procedure requires that you have previously set the version to all manifests, features, product, etc.. to the same version that you are releasing. For doing that refer to changeVersions.sh script)
  • Make sure you don't have any local changes
  • You must comply with the tag convention vX.Y.Z

Prepare next development version

Once you have released you need to prepare the code base to work on the next version. In a regular maven project this would have been done automatically by the release plugin. But we are not using that, so you need to update the version to the next one in a lot of places (poms but also MANIFEST.MF, feature.xml, etc). So for that we have created a simple small bash script.

Example

# update 'dev' branch
git co master
git pull
git co dev
git pull
git merge master
git push

And make sure that Travis builds the changes correctly !

Clone this wiki locally