mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-04-21 21:52:03 +02:00

* extras/packaging/gnu-linux/scripts/release-version.sh: Add script for deriving (reproducibly) a release version. The format will follow a 'YYYYMMDD.X' scheme, where 'YYYYMMDD' is the date of the last commit on the current branch, and 'X' the number of releases tagged that day, starting from zero. Example: the first stable release with a newest commit date of 2023-01-02 would have a version of '20230102.0', the subsequent one '20230102.1', and so on. This is derived by counting the number of git tags with the prefix 'TYPE/YYYYMMDD', where 'TYPE' is the release type: either 'stable', 'beta', or 'nightly'. * extras/packaging/gnu-linux/Jenkinsfile: Call the above new script to derive the release version to use for tagging. * extras/packaging/gnu-linux/Makefile: Switch from the previous 'jami_YYYYMMDD.hhmm.COMMIT.tar.gz' tarball filename format to 'jami-YYYYMMDD.X.tar.gz'. The new format is shorter, omits the unnecessary and confusing commit id, and uses dash instead of underscore. Also, it contains everything in a top-level directory with the same name as the tarball (without the .tar.gz extensions), so that 'jami-YYYYMMDD.X.tar.gz' nicely extracts to 'jami-YYYYMMDD.X'. With these changes, our release tarballs will follow more closely the related instructions from the GNU maintainers manual: https://www.gnu.org/prep/maintain/html_node/Distribution-tar-Files.html Lastly, this change inadvertently 'fixes' a recent issue where the 'extras/ci/client-qt-gnulinux' subdirectory and its contents would be moved to top-level in the tarball due to one of the tarball transforms matching the 'client-qt' in the directory's name, replacing the 'extras/ci/client-qt' prefix with 'client-qt', thereby resulting in 'client-qt-gnulinux' being moved to the tarball's top-level. * .gitignore: Ignore several packaging-related directories and files. * extras/packaging/gnu-linux/rules/rpm/jami-daemon.spec: * extras/packaging/gnu-linux/rules/rpm/jami-libclient.spec: * extras/packaging/gnu-linux/rules/rpm/jami-qt.spec: * extras/packaging/gnu-linux/rules/rpm/jami.spec: Update the expected release tarball filename pattern in the 'Source' field. Also replace references to previous top-level directory name 'client-qt' with the new one 'jami-%{version}' where needed. * extras/packaging/gnu-linux/rules/rpm/jami-libqt.spec: Update the 'Source' field to follow new tarball name consistent with the main Jami release tarball. * extras/packaging/gnu-linux/scripts/build-package-rpm.sh: Update the tarball top-level directory pattern for the new format, now passing the --wildcards option to GNU Tar. Also use a name for the jami-libqt source tarball that is more consistent with the main Jami release tarball. * extras/packaging/gnu-linux/scripts/build-package-snap.sh: Update the top-level directory pattern for the new format. * extras/packaging/gnu-linux/tarballs.manifest: Drop file accidentally checked into git. Change-Id: I2695f560c0bc5e61fb99dc0244f8fbb8e7026a62
39 lines
1.3 KiB
Bash
Executable file
39 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Copyright (C) 2020-2021 Savoir-faire Linux Inc.
|
|
#
|
|
# Author: Amin Bandali <amin.bandali@savoirfairelinux.com>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
# This script is used in the packaging containers to build a snap
|
|
# package on an ubuntu base distro.
|
|
|
|
|
|
set -e
|
|
|
|
tar xf "/src/$RELEASE_TARBALL_FILENAME" -C /opt
|
|
cd /opt/jami-*/
|
|
cp -r extras/packaging/gnu-linux/rules/snap/common .
|
|
cp -r extras/packaging/gnu-linux/rules/snap/${SNAP_PKG_NAME}/snapcraft.yaml .
|
|
|
|
# set the version and tarball filename
|
|
sed -i "s/RELEASE_VERSION/${RELEASE_VERSION}/g" snapcraft.yaml
|
|
|
|
snapcraft # requires snapcraft >= 4.8
|
|
|
|
# move the built snap to output
|
|
mv *.snap /opt/output/
|
|
chown -R "${CURRENT_UID}:${CURRENT_UID}" .
|
|
chown ${CURRENT_UID}:${CURRENT_GID} /opt/output/*.snap
|