Browse Source

only add user manuals to mac/windows packages if tag

use_builds_script
Alexandros Theodotou 2 years ago
parent
commit
4022c3f319
Signed by: alex
GPG Key ID: 022EAE42313D70F3
  1. 9
      meson.build
  2. 3
      osx-brew/make_pkg.sh.in
  3. 1
      osx-brew/meson.build
  4. 27
      scripts/get_latest_tag.sh.in
  5. 22
      scripts/is_tag.sh.in
  6. 12
      scripts/meson.build
  7. 3
      windows-msys/make_dist_dir.sh.in
  8. 1
      windows-msys/meson.build

9
meson.build

@ -38,9 +38,10 @@ zplugins_ver = get_option ('zplugins-ver') @@ -38,9 +38,10 @@ zplugins_ver = get_option ('zplugins-ver')
carla_git_ver = get_option ('carla-git-ver')
lsp_dsp_lib_ver = get_option ('lsp-dsp-lib-ver')
build_trial = get_option ('build-trial')
zrythm_https_repo = 'https://git.zrythm.org/zrythm/zrythm'
orig_inner_dir_name = 'zrythm-' + zrythm_git_ver
orig_zrythm_src_tarball_filename = orig_inner_dir_name + '.tar.gz'
orig_zrythm_src_tarball_url = 'https://git.zrythm.org/zrythm/zrythm/archive/' + zrythm_git_ver + '.tar.gz'
orig_zrythm_src_tarball_url = zrythm_https_repo + '/archive/' + zrythm_git_ver + '.tar.gz'
zrythm_inner_dir_name = 'zrythm-' + zrythm_pkg_ver
zrythm_src_tarball_filename = zrythm_inner_dir_name + '.tar.gz'
zplugins_src_tarball_filename = 'zplugins-' + zplugins_ver + '.tar.gz'
@ -83,6 +84,8 @@ global_conf.set ( @@ -83,6 +84,8 @@ global_conf.set (
'LIBDIR', libdir)
global_conf.set (
'DISTRO', distro)
global_conf.set (
'ZRYTHM_HTTPS_REPO', zrythm_https_repo)
global_conf.set (
'ZRYTHM_GIT_VERSION', zrythm_git_ver)
global_conf.set (
@ -147,6 +150,9 @@ global_conf.set ( @@ -147,6 +150,9 @@ global_conf.set (
subdir ('scripts')
subdir ('sources')
latest_tag = run_command (get_latest_tag).stdout ().strip ()
is_tag = run_command (is_tag_sh).stdout (). strip () == 'true'
carla_installation = custom_target (
'carla-installation',
output: 'carla-prefix',
@ -225,6 +231,7 @@ summary ({ @@ -225,6 +231,7 @@ summary ({
summary ({
'Meson path': get_option ('meson-path'),
'Git version': get_option ('zrythm-git-ver'),
'Is tag': is_tag,
'Package version': get_option ('zrythm-pkg-ver'),
'Build trial': get_option ('build-trial').to_string (),
'Carla version': get_option ('carla-git-ver'),

3
osx-brew/make_pkg.sh.in

@ -41,6 +41,7 @@ zrythm_bottle_name="zrythm$dash_trial" @@ -41,6 +41,7 @@ zrythm_bottle_name="zrythm$dash_trial"
carla_bottle_ver="@CARLA_BOTTLE_VER@"
built_zplugins_dir="@BUILT_ZPLUGINS_DIR@"
meson_src_root="@MESON_SOURCE_ROOT@"
is_tag='@IS_TAG@'
inner_dir_name="${out_file%.*}"
inner_dir_name="`basename $inner_dir_name`"
@ -214,7 +215,7 @@ work_dir=`mktemp -d` @@ -214,7 +215,7 @@ work_dir=`mktemp -d`
mkdir $work_dir/$inner_dir_name
cp $inner_dir/macOS-x64/target/pkg/Zrythm-macos-installer-x64-$zrythm_product_ver.pkg $work_dir/$inner_dir_name
if [ "$dash_trial" != "-trial" ]; then
if [ "$dash_trial" != "-trial" ] && [ "$is_tag" = "true" ]; then
echo "adding user manuals" ;
if [ -f "$manuals_zip" ]; then
unzip -o $manuals_zip -d $work_dir/$inner_dir_name/ ;

1
osx-brew/meson.build

@ -59,6 +59,7 @@ osx_brew_conf.set ( @@ -59,6 +59,7 @@ osx_brew_conf.set (
osx_brew_conf.set (
'BUILT_ZPLUGINS_DIR',
zplugins_installation.full_path ())
osx_brew_conf.set ('IS_TAG', is_tag ? 'true' : 'false')
# configure scripts
make_bottle_sh = configure_file (

27
scripts/get_latest_tag.sh.in

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
#!@BASH@
#
# Copyright (C) 2021 Alexandros Theodotou <alex at zrythm dot org>
#
# This file is part of Zrythm
#
# Zrythm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Zrythm 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
git ls-remote \
--tags @ZRYTHM_HTTPS_REPO@ 'v*' | \
grep -o 'refs/tags/v[0-9]*\.[0-9]*\.[0-9]*.*[0-9]' | \
grep -o '[^\/]*$' | \
sed '/-/!{s/$/_/}' | \
sort -V --reverse | \
sed 's/_$//' | \
head -n 1

22
scripts/is_tag.sh.in

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
#!@BASH@
#
# Copyright (C) 2021 Alexandros Theodotou <alex at zrythm dot org>
#
# This file is part of Zrythm
#
# Zrythm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Zrythm 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
git ls-remote \
--tags @ZRYTHM_HTTPS_REPO@ | \
grep -q '@ZRYTHM_GIT_VERSION@' && echo 'true' || echo 'false'

12
scripts/meson.build

@ -17,6 +17,18 @@ @@ -17,6 +17,18 @@
# configure each script
get_latest_tag = configure_file (
output: 'get_latest_tag.sh',
input: 'get_latest_tag.sh.in',
configuration: global_conf,
)
is_tag_sh = configure_file (
output: 'is_tag.sh',
input: 'is_tag.sh.in',
configuration: global_conf,
)
make_arch_pkg = configure_file (
output: 'make_arch_pkg.sh',
input: 'make_arch_pkg.sh.in',

3
windows-msys/make_dist_dir.sh.in

@ -16,6 +16,7 @@ dash_trial="@DASH_TRIAL@" @@ -16,6 +16,7 @@ dash_trial="@DASH_TRIAL@"
zrythm_pkg_ver="@ZRYTHM_PKG_VERSION@"
zrythm_inner_dir_name="@ZRYTHM_INNER_DIR_NAME@"
zrythm_src_tarball_filename="@ZRYTHM_SOURCE_TARBALL_FILENAME@"
is_tag='@IS_TAG@'
mingw_prefix="$chroot_dir/mingw64"
app_name="Zrythm$dash_trial"
@ -92,7 +93,7 @@ EOL @@ -92,7 +93,7 @@ EOL
# ******************************
# ******************************
if [ "$dash_trial" != "-trial" ]; then
if [ "$dash_trial" != "-trial" ] && [ "$is_tag" = "true" ]; then
echo "packaging user manuals" ;
unzip -o $manuals_zip -d $dist_dir/ ;
fi

1
windows-msys/meson.build

@ -36,6 +36,7 @@ windows_msys_conf.set ( @@ -36,6 +36,7 @@ windows_msys_conf.set (
windows_msys_conf.set (
'SUPPORTING_TEXT',
build_trial ? 'trying out' : 'supporting')
windows_msys_conf.set ('IS_TAG', is_tag ? 'true' : 'false')
mingw_zrythm_pkgbuild = configure_file (
output: 'PKGBUILD',

Loading…
Cancel
Save