To upgrade MariaDB using the custombuild script, do the following:
./build set mariadb 10.4
./build set mysql_inst mariadb
./build set mysql_backup yes
Where MariaDB can be 5.5, 10.0, 10.1, 10.2, 10.3, or 10.4
A full raw SQL backup will be run prior to the upgrade if you have mysql_backup=yes set. It goes without saying, always make backups, either with this tool or with other means.