Before this step: How to release Preparation
Table of contents
-
- 1.1. Requirements
- 1.2. Release Steps
- 1.3. After Release Steps
- Related
1.1. Requirements
- Unix shell environment, Linux or OSX suitable.
- Git
- PHP 7.x or 8.x CLI with MySQL, iconv, DOM and SimpleXML extensions. Note about php versions: Use PHP 7.x for Tiki 25.x releases and lower, and PHP 8.x for Tiki 26.x releases and upper.
- PHP configuration must allow running external programs (like shell scripts)
- Starting from Tiki 27.x and later versions release, Node.js and NPM are required for the JavasScript build system(for js and css compilation). Please check the required the versions in package.json at the root of the project in the "engines" property.
- 7za or 7z needed for creating 7zip archives. (may be installed in OSX through homebrew by typing
brew install p7zip) - Plenty of disk space and memory 😉 - at least 64M of memory for php (in php.ini for php-cli)
- The main packaging script is at doc/devtools/release.php but releasing a Tiki version is a lot more than just running the packaging script 😊
1.2. Release Steps
1.2.1. Checkout Tiki
For this step we have 2 options, so you can use one of your choice but the first is recommended.
| OPTION 1 | Clone the branch you need to create the release for in a separate folder to separate it with your development instance by doing the following. Note that the bellow command is an example, so replace the branch value with that you want to work on, the reference repository by the path of your development instance to gain time when cloning and the target folder by that you want. Also remember to ensure that the reference repository is up to date and contains the required objects for successful cloning. Copy to clipboard
|
| OPTION 2 | checkout the correct branch, i.e the branch you want to create the release for and make sure your origin is https://gitlab.com/tikiwiki/tiki.git. For example, if you want to create the 29.1 release, do Copy to clipboard
|
1.2.2. Setup.sh
Run:
sh ./setup.sh
And choose 'b' option to install all necessary setup and exit (composer, npm, etc) instead of 'f', which is not needed for release.
1.2.3. Update lib/setup/twversion.class.php before the release
Look for section with "Release Managers should update this array before release." of https://gitlab.com/tikiwiki/tiki/-/blob/master/lib/setup/twversion.class.php (of your relevant branch)
- increment the version number and the star name in the constructor. The star name only needs to be updated if it is a major release (Eg. Tiki 29.0alpha) but this is usually done during branching, it's done during release if it was not done during branching.
- temporarily, remove the vcs from the branch number. E.g.
Copy to clipboardfunction TWVersion() { // Set the development branch. Valid are: // stable : Represents stable releases. // unstable : Represents candidate and test/development releases. // trunk : Represents next generation development version. $this->branch = 'stable'; // Set everything else, including defaults. $this->version = '22.1vcs'; // needs to have no spaces for releases $this->star = 'Corona Borealis';
Since we where to release 22.1, we need to remove the "vcs" from "22.1vcs", so this part will stay as:
Copy to clipboard// Set everything else, including defaults. $this->version = '22.1'; // needs to have no spaces for releases - update list of valid releases in
tikiVersions()- Make sure you add all Tiki versions (not just the one you are doing now). Ex.: when 5.0 is released, 4.2 will probably exist, as this was added to branches/4.x but not merged by script.
- change the version branch to "unstable", "stable", or "trunk" as explained in that file
- Update the star name in the list in the function
tikiStars()if it's not yet done. - Commit your changes with this commit message (change \$VERSION by the version of the release):
Copy to clipboard[REL] Preparing \$VERSION release - Then push your commit to https://github.com/tikiwiki/tiki.git in the corresponding branch (the branch you are doing the release for).
Note: Do not push your changes if you are doing a pre-release test.
1.2.4. Run script
The main packaging script is at doc/devtools/release.php
Go to the newly created directory and run
php doc/devtools/release.php --help
to get the command help and see different options that can be used.
To Run the release command:
php doc/devtools/release.php 26.1
(replace 26.1 with the corresponding release version)
If the previous command fails at the secdb file creation step, you may need to run the release command providing your MySQL credentials for the script to successfully create the secdb file for you.
php -d mysqli.default_host=HOST -d mysqli.default_user=USER -d mysqli.default_pw=PASS doc/devtools/release.php 28.2
(replace the version number with the corresponding release version)
Note: Do not run this command first. Before running it, please start with the creation of pre-release packages as described in the next step.
1.2.5. Create and test pre-release packages
- This is done by executing the release script with the release version as argument, using the format major.minor preXYZ (XYZ can be RC1, RC2, alpha, beta1, beta2, etc.)
- Use the --help option of the release script for advanced help on options (like using a web proxy)
E.g.
php8.1 doc/devtools/release.php 29.0 preRC1 --devmode
php8.1 doc/devtools/release.php 29.1 pre --devmode
Note: Use the command for the version of PHP which is the minimum spec for that branch. In this case we need PHP 7.1 for Tiki 19.x, 5.6 for 18.x and 15.x and 5.3 for 12.x, for instance
The release script has an interactive mode, enabled by default, that will ask you if you really want to do each step. It also asks for a confirmation before committing any changes. You can have a look at them with another shell by using this command:
git status git diff
1.2.5.1. Check the generated README file
Note: For Tiki 30 and later, this step can be skipped. The README is no longer generated per release; the version from master (trunk) is shared across versions.
- Check links/content in the generated README file
1.2.6. Launch the release script again
After testing, launch the release script again, now without "pre":
{CODE(colors="shell")} php -d mysqli.default_host=HOST -d mysqli.default_user=USER -d mysqli.default_pw=PASS doc/devtools/release.php 29.0 RC1 {CODE}
Or
php -d mysqli.default_host=HOST -d mysqli.default_user=USER -d mysqli.default_pw=PASS doc/devtools/release.php 29.1
Note: If you run the php command without specifying explitely the version as in the above commands, please make sure your CLI php version is set to the required one of the branch you are making the release for.
1.2.6.1. Troubleshooting
1.2.6.1.1. Mysql credentials
In step 11 (or 8 ?) of the release script ("8) Generate SecDB file 'db/tiki-secdb_12.1_mysql.sql'?"), you might see this type of error:
SecDB step failed because some filenames need escaping but no MySQL connection has been found.
Try this command line instead (replace HOST, USER and PASS by a valid MySQL host, user and password) :
/usr/bin/php -d mysql.default_host=HOST -d mysql.default_user=USER -d mysql.default_password=PASS doc/devtools/release.php 12.1 beta
If so, provide your own HOST, USER and PASS for your MySQL from the machine where you are running the release script, and you should be fine, then.
1.2.7. Test the produced "tarballs" and share the testing
Test on your server. Ideally, you have 1-2 other people trying on different servers. In case of a major version (x.0), you need at least 3 installations from 3 different people
- Make sure to do a file integrity check with
tiki-admin_security.php?check_files - There are 4 featured profiles in the installer and these are great tests.
- One tester should test an upgrade
- The other tester should test a fresh install
- this can help you to make test: http://dev.tiki.org/Tiki-Test-Plan-for-new-site-admin
1.2.8. Upload tarballs to Sourceforge
When the "tarballs" are tested, the next step is to upload them to sourceforge. For that we have 3 options:
To upload the 'tarballs', copy-paste and execute the following line (and change '$SF_LOGIN' by your SF.net login and $VERSION with the version, which may look like "7.0.rc1" ):
cd ~/tikipack/$VERSION scp *bz2 *gz *zip *7z $SF_LOGIN@frs.sourceforge.net:/home/pfs/project/t/ti/tikiwiki/$RELEASEFOLDER$
#since 15.0 : scp *bz2 *gz *zip *7z username,tikiwiki@frs.sourceforge.net:/home/pfs/project/t/ti/tikiwiki/Tiki_XX.x_Starname/XX.Y
Alternatively, you can do it with sftp
User jsmith seeks to put tiki-12.1.* .7z .zip .tgz .bz2 to the 12.1 directory of his project, tikiwiki: $ sftp jsmith@frs.sourceforge.net Connecting to frs.sourceforge.net... jsmith,fooproject@frs.sourceforge.net's password: sftp> cd /home/frs/project/tikiwiki/Tiki_12.x_Altair/ sftp> mkdir 12.1 sftp> cd 12.1 sftp> mput tiki*.* Uploading tiki-12.1.7z to /home/pfs/project/tikiwiki/Tiki_12.x_Altair/12.1/tiki-12.1.7z tiki-12.1.7z 100% 27MB 2.3MB/s 00:12 Uploading tiki-12.1.tar.bz2 to /home/pfs/project/tikiwiki/Tiki_12.x_Altair/12.1/tiki-12.1.tar.bz2 tiki-12.1.tar.bz2 100% 38MB 2.9MB/s 00:13 Uploading tiki-12.1.tar.gz to /home/pfs/project/tikiwiki/Tiki_12.x_Altair/12.1/tiki-12.1.tar.gz tiki-12.1.tar.gz 100% 43MB 2.7MB/s 00:16 Uploading tiki-12.1.zip to /home/pfs/project/tikiwiki/Tiki_12.x_Altair/12.1/tiki-12.1.zip tiki-12.1.zip 100% 52MB 2.9MB/s 00:18 sftp>
You need to have "release technician" status on SourceForge. Ask an Admin if you don't have it.
Update default download version on Sourceforge:
This needs to be done only if you are releasing a new major version or a minor version of the latest stable branch. To do so:
- Go to the Files page while logged in to access the File Manager
- From the File Manager navigate to the directory that contains the file
- Select the "i" icon for the file you wish to set as the default download
- On the bottom right check the boxes for the operating systems which you wish the file to be the default download for.
- Select save
1.3. After Release Steps
1.3.1. Update lib/setup/twversion.class.php
- change $this->version = '23.1'; to '23.2vcs';
Needs to have no spaces and use the format X.YabcZ see tikiVersions fn below for examples
You can add a commit message like this one:
[REL]Closing release 12.1beta
1.3.2. Update show2.t.o info (Skipped until note is resolved)
Note: There is currently no infrastructure for creating show*.t.o instances for Tiki 26 and above. This needs to be discussed with Marc.
Some refs: https://avan.tech/item138114 and https://dev.tiki.org/item8491-Show2-instance-server-doesn-t-easily-support-Tiki26
Please coordinate with Marc to achieve this step, you need access on dev.t.o and show.t.o server.
There are still a few extra steps needed, like updating the dev.t.o tracker5 & show2.t.o server to allow users to reproduce bugs in tiki instances using the new version, etc.
1.3.2.1. checkout that version in the local cache folder of tiki in show2.t.o
In order to have a new tiki version available in show*.t.o, a new folder and vcs checkout need to be added manually at show2.tiki.org under:
/usr/local/src/tiki
in show2.tiki.org
It's using subversion.
1.3.2.2. tell tim to manage also that branch to update tiki from that version also
Meet TIM: TIM
And some script need to have this new version added as a name of branches to work with. Editing this file:
/usr/local/sbin/tim-common
and add the new version (23.x in this example) at this line starting with "BRANCHES=":
BRANCHES="trunk 23.x 22.x 21.x 20.x 19.x 18.x"
1.3.2.3. make a tar.gz file from the new branch
This way, making new instances will not need to get the whole tiki file tree from subversion, but they will start by copying and unpacking a pre-fetched tiki version for that branch, and just updating that file tree through subversion. If you don't make tar.gz file, new show instance creation will fail.
And you need to create that tar.gz without the prefix of the parent folder where the new branch is. You can do so with thee type of commands:
cd /usr/local/src/tiki/ cd 23.x ln -s _htaccess .htaccess tar -czvf ../23.x.tar.gz ./ -R
1.3.2.4. update the field in tracker5 at dev.t.o to allow users to choose that version
Edit this field "Demonstrate Bug (Tiki 19+)":
https://dev.tiki.org/tiki-tracker-edit_field?trackerId=5&fieldId=236&modal=1
Add the new version (23.x in this example) in this field of the form:
Options for show.tiki.org > Supported Versions : trunk,23.x,22.x,21.x,20.x,19.x,18.x