Skip to content

Bump the version number

Thorben Groos edited this page Dec 13, 2020 · 8 revisions

How to bump the version number

This tutorial shows how to bump the version number before releasing a new JCT version. An increased version number is necessary for the update site to work. This tutorial shows bumping the version number from 1.0.0 to 1.0.1.

1. Step: Update the product version

Update the jcryptool.product file

1.2 Update the product version in pom.xml in releng

<product.version>1.0.0</product.version>

https://github.com/jcryptool/core/blob/898123736611086bed0ac8c5b34d09982172c2c2/org.jcryptool.releng/pom.xml#L40

2. Step: Update the pom.xml in the core and crypto repositories

Both pom.xml files are most likely not listed in the Project Explorer of eclipse. So, you have to manually navigate in your file browser to them. They are located in the git repository directly in the core/pom.xml and crypto/pom.xml directory.

After you have changed them, they will appear in the git staging view in eclipse as unstaged changes, so you can push them later easily via the eclipse built-in git client to your fork.

Update the version numbers in core/pom.xml and crypto/pom.xml

3. Step: Increase the features version numbers

You have to update all version numbers of the features. The easiest way to this is to press strg+h (Search) and switch to the rider on the far left “File Search”. There, search for the current feature version. Additionally, specify the file type in which the term should be searched. This is feature.xml. The screenshot shows this for the update from version 1.0.0 to 1.0.1.

Search for the version numbers of the features

Now press the “Replace” button. In the following window you have to enter what you want to replace the term. This is the new version number, for example "version =" 1.0.0 "".

Replace the old version number by the new one

Now all features are updated. Maybe eclipse will show several error stating there are version conflicts. We will fix this now.

4. Step: Update all other pom.xml files

Update all pom.xml files to the new version number. The procedure is very similar to the procedure for updating the features. Search with ctrl + h for " 1.0.0 </ version>" in all pom.xml and press "Replace".

Search for the version numbers in all pom.xml's

Now replace the old version number with the new one.

Replace the old version number by the new one in the pom's

Step 5: Update all MANIFEST.MF

The same procedure as for the pom.xml: Search for "Bundle-Version: 1.0.0" in all MANIFEST.MF files and replace the term "Bundle-Version: 1.0.1".

Search for the version numbers in all MANIFEST.MFs

Replace the old version number by the new one in the MANIFEST.MF's

Now you are mostly done.

6. Step: Resolve the issues that have arisen due to the increase of ALL version numbers

You have just increased all version numbers, even those of plugins that can not be increased. I am thinking here of the update from 1.0.0 to 1.0.1 in particular net.sourceforge.ehep and net.sourceforge.ehep.nl_de. Other plugins with version errors should be displayed in Eclipse under Problems. There you have to manually reset the pom.xml and MANIFEST.MF to the old version number.

Just open the pom.xml in eclipse. In the Overview tab you can now easily adjust the version number. Switch it back to 1.0.0.

Fix issues in pom.xmls's

Now you can adjust the MANIFEST.MF. Therefore, open the plugin.xml the plugin that causes version conflicts. In this example this is net.sourceforge.ehep. In the overview tab replace the new version number with the old one.

Fix issues in MANIFEST.MF's

7. Step: Push your changes to your fork and create a Pull Request

Push your changes to your fork. This is described here (https://github.com/jcryptool/core/wiki/Git-Basics), if you do not now to do this. Create a Pull Request and wait untill Travis has tried a test build based on your Pull Request. If this has gone through successfully you can merge your changes.

8. Step: Copy the repository folder to https://www.cryptool.org/jct/update

Copy the repository folder that is created during the build by maven to the update site. Now everybody who starts his JCT will get a notification that updates are available, like in the following screenshot.

Notification for updates available