Difference between revisions of "Releasing Minetest"

From Minetest Developer Wiki
Jump to navigation Jump to search
(→‎Before releasing: clarify: translations → source strings)
(32 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Before releasing ==
+
== Checklist ==
 +
 
 +
<pre>
 +
- Feature freeze
 +
  - [ ] Announced
 +
  - [ ] Release candidate advertised
 +
  - [ ] Weblate sources regenerated and strings frozen
 +
- Pre-release (day of release)
 +
  - [ ] Autogenerate files
 +
  - [ ] Correct special strings on Weblate (`LANG_CODE`)
 +
  - [ ] Update translations from Weblate
 +
  - [ ] Update changelog
 +
  - [ ] Ensure protocol version codes have been bumped
 +
- Release
 +
  - [ ] Run bump_version and verify
 +
  - [ ] Push new tag
 +
  - [ ] Build and upload Windows version
 +
  - [ ] Build and upload Android version
 +
  - [ ] Create forum topic
 +
  - [ ] Notify rubenwardy to announce on Twitter, etc.
 +
  - [ ] Notify downstream maintainers
 +
</pre>
 +
 
 +
== Feature Freeze ==
  
 
=== Announce a feature freeze ===
 
=== Announce a feature freeze ===
Line 10: Line 33:
 
=== Autogenerate files ===
 
=== Autogenerate files ===
  
Autogenerate config file examples such as <code>minetest.conf.example</code>, etc.
+
Ensure that the <code>language</code> setting enum values contain <code>en</code>: there is no "en" directory, but Minetest supports it.
 +
Autogenerate config file examples such as <code>minetest.conf.example</code> (see bottom of <code>builtin/mainmenu/dlg_settings_advanced.lua</code>), etc.
  
Also update [[Translation|translation]] templates (both engine and any default games).
+
Also update [[Translation|translation]] templates (both engine and any default games). Note that before you regenerate translations, you most likely want to [[#Update_translations_from_Weblate|import existing changes]] first.
  
 
Look into the <code>util</code> sub-directory for tools like <code>updatepo.sh</code>.
 
Look into the <code>util</code> sub-directory for tools like <code>updatepo.sh</code>.
Line 18: Line 42:
 
=== Update source strings on Weblate ===
 
=== Update source strings on Weblate ===
  
Make sure that the source strings on hosted.weblate.org (or on whatever online [[Translation|translation]] platform our translations are currently hosted) are up-to-date. Please also notify translators so they can start working.
+
Make sure that the source strings on hosted.weblate.org are up-to-date. Please also notify translators so they can start working.
 +
 
 +
Do '''not''' just blindly run the scripts without checking. Check if the source strings on Weblate were ''actually'' updated. A simple way to check is to look at any translation that was at 100% (on Weblate) ''before'' the update. After the update, the percentage should drop because of new strings. If it didn't drop but you know there are new strings in Minetest, this means the update failed.
 +
 
 +
== Before releasing ==
 +
 
 +
=== Verify special translation strings ===
 +
 
 +
The translation files contain a special string: [https://hosted.weblate.org/translate/minetest/minetest/en/?q=LANG_CODE&checksum=&offset=1#translations LANG_CODE] (see [[Translating]]).
 +
 
 +
Verify that all *.po files have a valid value for these strings because translators frequently misunderstand them and enter an invalid value. Fix any invalid values on Weblate by either entering the correct one or by removing the bad translation.
 +
 
 +
=== Update translations from Weblate ===
 +
 
 +
'''How to do this''' -> [[Translating#How_to_merge_translations_from_Hosted_Weblate]]
 +
 
 +
If doing a backported release, you can use the following command to cherry-pick all translation commits from weblate:
  
Do '''not''' just blindly run the scripts without checking. Check if the source strings on Weblate were ''actually'' updated. A simple way to check this to look at any translation that was at 100% (on Weblate) ''before'' the update. After the update, the percentage should drop because of new strings. If it didn't drop but you know there are new strings in Minetest, this means the update failed.
+
<source>
 +
git log --reverse --pretty=format:"%h" $BASE..weblate/master -- po | xargs -L1 git cherry-pick
 +
</source>
 +
 
 +
BASE is the commit on master to start from when looking for translation commits. This commit should be newer than the last translation commit on the backport-X branch.
  
 
=== Update changelog ===
 
=== Update changelog ===
  
 
Changelog can be found [[Changelog|here]].
 
Changelog can be found [[Changelog|here]].
 +
 +
=== Ensure protocol version codes have been bumped ===
 +
 +
If not a patch release: ensure that PROTOCOL_VERSION has been increased since the last release. ([https://github.com/minetest/minetest/issues/11603 deciding discussion])
 +
 +
If formspec features have been added: ensure LATEST_FORMSPEC_VERSION has been increased since the last release.
  
 
== The process ==
 
== The process ==
Line 32: Line 82:
 
=== Update version in source ===
 
=== Update version in source ===
  
* '''Define''' a new version number by running <code>util/bump_version.sh</code>. Verify that this script correctly.
+
* '''Define''' a new version number by running <code>util/bump_version.sh</code>. Verify that this script correctly
 
** changes TRUE to FALSE for the line ''set(DEVELOPMENT_BUILD TRUE)'' in CMakeLists.txt
 
** changes TRUE to FALSE for the line ''set(DEVELOPMENT_BUILD TRUE)'' in CMakeLists.txt
 
** updates the version number and release date in misc/net.minetest.minetest.appdata.xml
 
** updates the version number and release date in misc/net.minetest.minetest.appdata.xml
** increments ''versionCode'' in build/android/build.gradle
+
** increments ''versionCode'' in build/android/build.gradle by 2
 
** and commits.
 
** and commits.
 
* '''Tag''' the version in local git (the script does this) to allow the cmake versioning script to remove the git hash from the version. Do not push the tag to GitHub yet.
 
* '''Tag''' the version in local git (the script does this) to allow the cmake versioning script to remove the git hash from the version. Do not push the tag to GitHub yet.
Line 45: Line 95:
 
* If at all possible, debug builds (for both MSVC and MinGW) should be produced along with the regular release builds.
 
* If at all possible, debug builds (for both MSVC and MinGW) should be produced along with the regular release builds.
 
* As of April 2018, this GitLab pipeline can alternatively provide win32/64 packages: https://gitlab.com/minetest/minetest/pipelines
 
* As of April 2018, this GitLab pipeline can alternatively provide win32/64 packages: https://gitlab.com/minetest/minetest/pipelines
 +
** Since 5.0, the 64-bit builds are compiled with GC64-enabled LuaJIT (to avoid [https://github.com/minetest/minetest/issues/2988 #2988])
  
 
'''''Make sure that the Windows builds work before continuing to do anything!!'''''
 
'''''Make sure that the Windows builds work before continuing to do anything!!'''''
Line 64: Line 115:
  
 
==== The problem on the stable-5 branch ====
 
==== The problem on the stable-5 branch ====
Usually, merging releases onto the stable branch just consists of adding the commits to the branch, as it contains direct ancestors of master commits, and git can do a fast forward. During release/freeze of 5.0.1 (both minetest and minetest_game), the anchestor rule has been broken.
+
Usually, merging releases onto the stable branch just consists of adding the commits to the branch, as it contains direct ancestors of master commits, and git can do a fast forward. During release/freeze of 5.0.1 (both minetest and minetest_game), the ancestor rule has been broken.
  
Therefore, you'll generate merge commits, but this shouldn't be a problem. In the case of merge conflicts, ensure that the changes on stable-5 are all discarded in favour of the tagged commit at master, by doing a merge commit like:
+
Therefore, you'll generate merge commits, but this shouldn't be a problem. In the case of merge conflicts, ensure that the changes on stable-5 are all discarded in favor of the tagged commit at master, by doing a merge commit like:
  
 
     git checkout version-tag
 
     git checkout version-tag
Line 74: Line 125:
 
=== Update Launchpad stable build to get Ubuntu builds for the new version ===
 
=== Update Launchpad stable build to get Ubuntu builds for the new version ===
  
celeron55, est31, and ShadowNinja have access.
+
celeron55, rubenwardy, and ShadowNinja have access.
  
 
Process:
 
Process:
* Go to the [https://code.launchpad.net/~minetestdevs/+recipe/minetest-stable recipe], open the upstream and upstream_game repos (linked in the recipe at the bottom) and click "Import now" to update launchpad's copy of the repos. The packaging repo usually does not need updates unless Minetest has a new dependency.
+
 
* Once the repos have finished importing, edit the recipe with the new version and commit hashes and save. Use commit hashes from the stable-<version> branches (just policy, no technical requirement).
+
* Go to [https://code.launchpad.net/~minetestdevs/minetest-c55/+git/upstream minetest-c55/upstream] and [https://code.launchpad.net/~minetestdevs/minetest-c55/+git/upstream_game minetest-c55/upstream_game] and click "start import".
* Click "Request builds" and wait for builds to complete.
+
* First, find out the commit hashes of the minetest and minetest_game git repos corresponding to the release.
 +
* Now visit the [https://code.launchpad.net/~minetestdevs/+recipe/minetest-stable recipe].
 +
* At the bottom of the page there is a section called "Recipe contents". In this section you need to edit the recipe. Make sure you update:
 +
** The version number at the end of the first line. Doing this is a must otherwise there would be duplicate packages which would lead to a fail. The version number has a format like <code>5.1.1-ppa0</code>. You should keep the ppa postfix so that it's easy to differentiate the package by origin, ppa or upstream Debian.
 +
** The commit hash of the main minetest repo in the second line.
 +
** The commit hash of the minetest_game repo in the last line.
 +
* Check whether everything has been updated correctly.
 +
* Click the green "Request builds" link, enable the newer distro versions, and click confirm.
  
 
The build has two steps: first it assembles the source code and uploads it, then it builds the code.
 
The build has two steps: first it assembles the source code and uploads it, then it builds the code.
Line 87: Line 145:
  
 
'''Notify''' the Android maintainers to update their APKs for their corresponding platforms:
 
'''Notify''' the Android maintainers to update their APKs for their corresponding platforms:
* '''nerzhul''' (@ chat.freenode.net) for google play. He also holds the signature keys for the play app.
+
* '''nerzhul''' or '''rubenwardy''' for Google Play. Both also hold the signature keys for the app.
* '''est31''' (@ chat.freenode.net) for f-droid. As f-droid signs its apps itself, the release can be done without him. Best way if est31 is unavailable is to ask on freenode channel '''#fdroid''' for help. If that does not help, mention them on GitHub or check the Mozilla IRC network.
 
==== How-to for binary release app stores ====
 
You can do the following step to upload minetest to app stores like Google Play, where you only can submit an app in binary form:
 
* '''Sign the package:''' jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore keystore-minetest.jks bin/Minetest-release-unsigned.apk Minetest
 
* '''Zipalign the apk:''' zipalign -v 4 bin/Minetest-release-unsigned.apk Minetest-release.apk
 
  
 +
==== Building and signing APKs for the Play Store ====
  
 +
* Run the Android build process as usual
 +
* '''Sign the package:''' <code>"~/Android/Sdk/build-tools/29.0.3/apksigner" sign --ks keystore-minetest.jks .../app-armeabi-v7a-release.apk</code>
 +
* EDIT: You can use Android Studio to generate bundles/apks if you upgrade the jks
 +
 +
==== Creating Native Debug Symbols ====
 +
 +
* Copy native/build/intermediates/ndkBuild/release/obj/local/ to new folder
 +
* Remove all but .so files from new folder
 +
* Check the .so contain debug info using the file command
 +
* zip -r symbols.zip .
  
 
== After releasing ==
 
== After releasing ==
Line 110: Line 174:
 
* Don't forget to edit the [http://www.minetest.net minetest.net] page.
 
* Don't forget to edit the [http://www.minetest.net minetest.net] page.
 
* Post a new topic in the [https://forum.minetest.net/viewforum.php?f=18 News section] of the forum. '''See [[Changelog]].'''
 
* Post a new topic in the [https://forum.minetest.net/viewforum.php?f=18 News section] of the forum. '''See [[Changelog]].'''
 +
** It is customary to sticky the latest release topic and lock older ones.
 
* Announce the release on the [https://twitter.com/MinetestProject Twitter account]. rubenwardy has access.
 
* Announce the release on the [https://twitter.com/MinetestProject Twitter account]. rubenwardy has access.
  
 
=== Notify known package maintainers ===
 
=== Notify known package maintainers ===
  
* '''emptty''' (@ chat.freenode.net; Martin Quinson) maintains Debian packages.
+
* '''Arch Linux'''/Manjaro: can be flagged outdated on the [https://archlinux.org/packages/community/x86_64/minetest/ package page]
* For Gentoo, one should mail '''proxy-maint@gentoo.org''' or talk on the ''#gentoo-proxy-maint'' channel on freenode (Zeitgeist_/damiel has resigned as proxy maintainer).
+
* '''Alpine Linux''': can be flagged outdated on the [https://pkgs.alpinelinux.org/package/edge/community/x86_64/minetest package page]
* '''nerzhul''' (@ chat.freenode.net) maintains the FreeBSD port and uploads new releases to the Google/Android Play Store.
+
* '''Debian'''/Ubuntu: has [https://tracker.debian.org/pkg/minetest own version tracking], no need to contact
* '''neoascetic''' (mail address on [https://github.com/neoascetic his GitHub profile page]) maintains Minetest in the OS X Homebrew repository.
+
* '''F-Droid''': has volunteer maintainers, if nobody notices consider opening an issue [https://gitlab.com/fdroid/fdroiddata/-/issues here]
* '''Akien''' (@ chat.freenode.net) maintains the minetest package in Mageia.
+
* '''Snap''': open an issue (or contribute) [https://github.com/snapcrafters/minetest here]
* '''sofar''' (@ chat.freenode.net) maintains the packages for Clear Linux (Intel's Linux distribution).
+
* '''Flatpak''':  open an issue (or contribute) [https://github.com/flathub/net.minetest.Minetest here]
<!-- TODO: Find more. -->
+
* '''Gentoo''': has [https://packages.gentoo.org/packages/games-action/minetest own version tracking], no need to contact
 +
 
 +
=== Add new version to Content DB ===
 +
 
 +
Add the new version to the drop-down list of compatible Minetest versions that authors can select for their things.
 +
 
  
 
[[Category:Core Engine]]
 
[[Category:Core Engine]]
 
[[Category:Rules and Guidelines]]
 
[[Category:Rules and Guidelines]]

Revision as of 15:48, 21 May 2022

Checklist

- Feature freeze
  - [ ] Announced
  - [ ] Release candidate advertised
  - [ ] Weblate sources regenerated and strings frozen
- Pre-release (day of release)
  - [ ] Autogenerate files
  - [ ] Correct special strings on Weblate (`LANG_CODE`)
  - [ ] Update translations from Weblate
  - [ ] Update changelog
  - [ ] Ensure protocol version codes have been bumped
- Release
  - [ ] Run bump_version and verify
  - [ ] Push new tag
  - [ ] Build and upload Windows version
  - [ ] Build and upload Android version
  - [ ] Create forum topic
  - [ ] Notify rubenwardy to announce on Twitter, etc.
  - [ ] Notify downstream maintainers

Feature Freeze

Announce a feature freeze

Usually, a feature freeze for one week is announced in #minetest-dev. New features aren't accepted in this time and people focus on finding and fixing bugs. To find high priority issues faster, consider linking a release candidate binary to get more test results (for master: GitLab pipeline). This release candidate is usually also posted on the forums (News section).

The feature freeze and release date is set by core developers.

Autogenerate files

Ensure that the language setting enum values contain en: there is no "en" directory, but Minetest supports it. Autogenerate config file examples such as minetest.conf.example (see bottom of builtin/mainmenu/dlg_settings_advanced.lua), etc.

Also update translation templates (both engine and any default games). Note that before you regenerate translations, you most likely want to import existing changes first.

Look into the util sub-directory for tools like updatepo.sh.

Update source strings on Weblate

Make sure that the source strings on hosted.weblate.org are up-to-date. Please also notify translators so they can start working.

Do not just blindly run the scripts without checking. Check if the source strings on Weblate were actually updated. A simple way to check is to look at any translation that was at 100% (on Weblate) before the update. After the update, the percentage should drop because of new strings. If it didn't drop but you know there are new strings in Minetest, this means the update failed.

Before releasing

Verify special translation strings

The translation files contain a special string: LANG_CODE (see Translating).

Verify that all *.po files have a valid value for these strings because translators frequently misunderstand them and enter an invalid value. Fix any invalid values on Weblate by either entering the correct one or by removing the bad translation.

Update translations from Weblate

How to do this -> Translating#How_to_merge_translations_from_Hosted_Weblate

If doing a backported release, you can use the following command to cherry-pick all translation commits from weblate:

git log --reverse --pretty=format:"%h" $BASE..weblate/master -- po | xargs -L1 git cherry-pick

BASE is the commit on master to start from when looking for translation commits. This commit should be newer than the last translation commit on the backport-X branch.

Update changelog

Changelog can be found here.

Ensure protocol version codes have been bumped

If not a patch release: ensure that PROTOCOL_VERSION has been increased since the last release. (deciding discussion)

If formspec features have been added: ensure LATEST_FORMSPEC_VERSION has been increased since the last release.

The process

This is mostly done by several core developers.

Update version in source

  • Define a new version number by running util/bump_version.sh. Verify that this script correctly
    • changes TRUE to FALSE for the line set(DEVELOPMENT_BUILD TRUE) in CMakeLists.txt
    • updates the version number and release date in misc/net.minetest.minetest.appdata.xml
    • increments versionCode in build/android/build.gradle by 2
    • and commits.
  • Tag the version in local git (the script does this) to allow the cmake versioning script to remove the git hash from the version. Do not push the tag to GitHub yet.
  • Build, get newest minetest_game, run and check if the thing seems to be working.

Build Windows version

  • These are built for 32-bit and 64-bit using either Visual Studio or MinGW. (sfan5 typically provides MinGW builds)
  • If at all possible, debug builds (for both MSVC and MinGW) should be produced along with the regular release builds.
  • As of April 2018, this GitLab pipeline can alternatively provide win32/64 packages: https://gitlab.com/minetest/minetest/pipelines
    • Since 5.0, the 64-bit builds are compiled with GC64-enabled LuaJIT (to avoid #2988)

Make sure that the Windows builds work before continuing to do anything!!

Tweak Windows package a bit

  • Include Minetest Game and other subgames that were decided on before the release.
  • As of 0.4.12, if an MSVC Windows build is made, a .pdb file is also generated. Each such file must be be provided and clearly associated with its respective build.
  • Generally, Those making official builds probably already know what they are doing.

Upload Windows package to somewhere

Update branches and tags of minetest and minetest_game on GitHub

  • Tag the master branch same as in previous releases: eg. name it "5.0.0".
  • The new release should be merged to the stable-5 branch on both minetest and minetest_game. Its important to merge, and not just rebase, so that git describe works.

The problem on the stable-5 branch

Usually, merging releases onto the stable branch just consists of adding the commits to the branch, as it contains direct ancestors of master commits, and git can do a fast forward. During release/freeze of 5.0.1 (both minetest and minetest_game), the ancestor rule has been broken.

Therefore, you'll generate merge commits, but this shouldn't be a problem. In the case of merge conflicts, ensure that the changes on stable-5 are all discarded in favor of the tagged commit at master, by doing a merge commit like:

   git checkout version-tag
   git merge -s ours origin/stable-5
   git push origin HEAD:stable-5

Update Launchpad stable build to get Ubuntu builds for the new version

celeron55, rubenwardy, and ShadowNinja have access.

Process:

  • Go to minetest-c55/upstream and minetest-c55/upstream_game and click "start import".
  • First, find out the commit hashes of the minetest and minetest_game git repos corresponding to the release.
  • Now visit the recipe.
  • At the bottom of the page there is a section called "Recipe contents". In this section you need to edit the recipe. Make sure you update:
    • The version number at the end of the first line. Doing this is a must otherwise there would be duplicate packages which would lead to a fail. The version number has a format like 5.1.1-ppa0. You should keep the ppa postfix so that it's easy to differentiate the package by origin, ppa or upstream Debian.
    • The commit hash of the main minetest repo in the second line.
    • The commit hash of the minetest_game repo in the last line.
  • Check whether everything has been updated correctly.
  • Click the green "Request builds" link, enable the newer distro versions, and click confirm.

The build has two steps: first it assembles the source code and uploads it, then it builds the code. If the first step completed successfully but the second one failed, you need to update the version number in the recipe (e.g. 1.2.3-ppa1) before rebuilding.

Build and Publish Android APK

Notify the Android maintainers to update their APKs for their corresponding platforms:

  • nerzhul or rubenwardy for Google Play. Both also hold the signature keys for the app.

Building and signing APKs for the Play Store

  • Run the Android build process as usual
  • Sign the package: "~/Android/Sdk/build-tools/29.0.3/apksigner" sign --ks keystore-minetest.jks .../app-armeabi-v7a-release.apk
  • EDIT: You can use Android Studio to generate bundles/apks if you upgrade the jks

Creating Native Debug Symbols

  • Copy native/build/intermediates/ndkBuild/release/obj/local/ to new folder
  • Remove all but .so files from new folder
  • Check the .so contain debug info using the file command
  • zip -r symbols.zip .

After releasing

Reenable -dev version suffix

Check that the util/bump_version.sh script did the following steps:

  • Update the version number in CMakeLists.txt and the titles of doc/client_lua_api.txt and doc/menu_lua_api.txt
  • Change FALSE to TRUE for the line set(DEVELOPMENT_BUILD FALSE) in CMakeLists.txt. This will add the -dev suffix to the version name again.
  • Commit.

Write a release notice

  • Don't forget to edit the minetest.net page.
  • Post a new topic in the News section of the forum. See Changelog.
    • It is customary to sticky the latest release topic and lock older ones.
  • Announce the release on the Twitter account. rubenwardy has access.

Notify known package maintainers

  • Arch Linux/Manjaro: can be flagged outdated on the package page
  • Alpine Linux: can be flagged outdated on the package page
  • Debian/Ubuntu: has own version tracking, no need to contact
  • F-Droid: has volunteer maintainers, if nobody notices consider opening an issue here
  • Snap: open an issue (or contribute) here
  • Flatpak: open an issue (or contribute) here
  • Gentoo: has own version tracking, no need to contact

Add new version to Content DB

Add the new version to the drop-down list of compatible Minetest versions that authors can select for their things.