1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

move/rename some variables for an easier upgrade

This commit is contained in:
Kay0u 2020-07-15 11:02:10 +02:00
parent ebdafc30ae
commit 98e0c720ce
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
7 changed files with 89 additions and 38 deletions

View file

@ -1,4 +1,4 @@
SOURCE_URL=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/stretch/gitlab-ce___VERSION__-ce.0_armhf.deb/download.deb
SOURCE_URL=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/__DEBIAN_VERSION__/gitlab-ce___VERSION__-ce.0_armhf.deb/download.deb
SOURCE_SUM=__SHA256_SUM__
SOURCE_SUM_PRG=sha256sum
SOURCE_FILENAME=__SOURCE_FILENAME__

View file

@ -268,13 +268,8 @@ then
cp ../conf/$architecture.src.default ../conf/$architecture.src
ynh_replace_string --match_string="__VERSION__" --replace_string="$gitlab_version" --target_file="../conf/$architecture.src"
ynh_replace_string --match_string="__SOURCE_FILENAME__" --replace_string="$gitlab_filename" --target_file="../conf/$architecture.src"
if [ $architecture = "x86-64" ]; then
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_x86_64_source_sha256" --target_file="../conf/$architecture.src"
ynh_replace_string --match_string="__DEBIAN_VERSION__" --replace_string="$gitlab_x86_64_debian_version" --target_file="../conf/$architecture.src"
elif [ $architecture = "arm" ]; then
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_arm_source_sha256" --target_file="../conf/$architecture.src"
fi
ynh_replace_string --match_string="__DEBIAN_VERSION__" --replace_string="$gitlab_debian_version" --target_file="../conf/$architecture.src"
ynh_replace_string --match_string="__SHA256_SUM__" --replace_string="$gitlab_source_sha256" --target_file="../conf/$architecture.src"
tempdir="$(mktemp -d)"

View file

@ -3,11 +3,19 @@
gitlab_version="11.11.5"
# There is no buster version for gitlab 11.X
gitlab_x86_64_debian_version="stretch"
gitlab_debian_version="stretch"
gitlab_x86_64_source_sha256="1ee3d6e8d2cc198f5466de0884c03f6016299db24859126af9a191501dbdef10"
gitlab_x86_64_stretch_source_sha256="1ee3d6e8d2cc198f5466de0884c03f6016299db24859126af9a191501dbdef10"
gitlab_arm_source_sha256="366e12b1f3d3b1694fcb6f13da9de908360ba93f75768d97e8d01e61e8652705"
gitlab_arm_stretch_source_sha256="366e12b1f3d3b1694fcb6f13da9de908360ba93f75768d97e8d01e61e8652705"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
gitlab_source_sha256=$gitlab_x86_64_stretch_source_sha256
elif [ "$architecture" = "arm" ]; then
gitlab_source_sha256=$gitlab_arm_stretch_source_sha256
fi
gitlab_filename="gitlab-ce-${gitlab_version}.deb"

View file

@ -4,11 +4,19 @@
gitlab_version="12.0.12"
# There is no buster version for gitlab 12.0.X
gitlab_x86_64_debian_version="stretch"
gitlab_debian_version="stretch"
gitlab_x86_64_source_sha256="e80cda4c328c2627278a3d74dbdd53420e1fec9ecbeaeb5d4dcb4773726e5904"
gitlab_x86_64_stretch_source_sha256="e80cda4c328c2627278a3d74dbdd53420e1fec9ecbeaeb5d4dcb4773726e5904"
gitlab_arm_source_sha256="a0862e3c31b61d9274a55b7307d15daa5258473ccb97b8ae0d807f7474c971df"
gitlab_arm_stretch_source_sha256="a0862e3c31b61d9274a55b7307d15daa5258473ccb97b8ae0d807f7474c971df"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
gitlab_source_sha256=$gitlab_x86_64_stretch_source_sha256
elif [ "$architecture" = "arm" ]; then
gitlab_source_sha256=$gitlab_arm_stretch_source_sha256
fi
gitlab_filename="gitlab-ce-${gitlab_version}.deb"

View file

@ -4,17 +4,29 @@ gitlab_version="12.10.11"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_x86_64_debian_version="$(lsb_release -sc)"
gitlab_x86_64_buster_source_sha256="1e5564604ddeb6bd8b152856e81a01230b5c66e41e1c07ac9f9f7c4593245b3c"
if [ "$gitlab_x86_64_debian_version" = "buster" ]
then
gitlab_x86_64_source_sha256="1e5564604ddeb6bd8b152856e81a01230b5c66e41e1c07ac9f9f7c4593245b3c"
else
gitlab_x86_64_source_sha256="75bff35148b64cf08cd428103c5fc90b597b5f20b4feede38019bdcaa33a3fda"
gitlab_x86_64_stretch_source_sha256="75bff35148b64cf08cd428103c5fc90b597b5f20b4feede38019bdcaa33a3fda"
gitlab_arm_stretch_source_sha256="07581f11cf2c76fe00afb7577df14fec86af1aa9c5ea6b3aea4997397e5915c6"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
gitlab_debian_version="$(lsb_release -sc)"
if [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
else
gitlab_source_sha256=$gitlab_x86_64_stretch_source_sha256
fi
elif [ "$architecture" = "arm" ]; then
gitlab_debian_version="stretch"
gitlab_source_sha256=$gitlab_arm_stretch_source_sha256
fi
gitlab_arm_source_sha256="07581f11cf2c76fe00afb7577df14fec86af1aa9c5ea6b3aea4997397e5915c6"
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
# Action to do in case of failure of the package_check

View file

@ -1,20 +1,33 @@
#!/bin/bash
# It's required to upgrade to the latest 13.0.x version before to another 13.X verion.
gitlab_version="13.0.6"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_x86_64_debian_version="$(lsb_release -sc)"
gitlab_x86_64_buster_source_sha256="91a3486de88d1f0ce108d0f0c9adafc83e24c678e5ce2750ec8d52d75e467c1d"
if [ "$gitlab_x86_64_debian_version" = "buster" ]
then
gitlab_x86_64_source_sha256="91a3486de88d1f0ce108d0f0c9adafc83e24c678e5ce2750ec8d52d75e467c1d"
else
gitlab_x86_64_source_sha256="175df478d80d15cbc19b69dee0c312058ba0530bed34f13050a25bb5b280315c"
gitlab_x86_64_stretch_source_sha256="175df478d80d15cbc19b69dee0c312058ba0530bed34f13050a25bb5b280315c"
gitlab_arm_stretch_source_sha256="cfd4f0f72ec2068d1566dd8699adedef210ada30644885e0d74beded3dd1b2b3"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
gitlab_debian_version="$(lsb_release -sc)"
if [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
else
gitlab_source_sha256=$gitlab_x86_64_stretch_source_sha256
fi
elif [ "$architecture" = "arm" ]; then
gitlab_debian_version="stretch"
gitlab_source_sha256=$gitlab_arm_stretch_source_sha256
fi
gitlab_arm_source_sha256="cfd4f0f72ec2068d1566dd8699adedef210ada30644885e0d74beded3dd1b2b3"
gitlab_filename="gitlab-ce-${gitlab_version}.deb"
# Action to do in case of failure of the package_check

View file

@ -4,17 +4,32 @@ gitlab_version="13.1.0"
# sha256sum found here: https://packages.gitlab.com/gitlab
gitlab_x86_64_debian_version="$(lsb_release -sc)"
gitlab_debian_version="$(lsb_release -sc)"
if [ "$gitlab_x86_64_debian_version" = "buster" ]
then
gitlab_x86_64_source_sha256="0ea54906b2f29f0bfcc9d4cad99ea399966055b1418633d0f62d46aea020877d"
gitlab_x86_64_buster_source_sha256="0ea54906b2f29f0bfcc9d4cad99ea399966055b1418633d0f62d46aea020877d"
gitlab_arm_source_sha256="2f7b2cc169a6de6152abf927214ee47f26634a5fa24ee55535ba7bb5074fd2b5"
else
gitlab_x86_64_source_sha256="c16d69de22fa701dbb4755756544c839ae82a519ac3516901f644add89ff1767"
gitlab_arm_buster_source_sha256="2f7b2cc169a6de6152abf927214ee47f26634a5fa24ee55535ba7bb5074fd2b5"
gitlab_arm_source_sha256="f24b6f085b1b1a426a277085b51f17d6821aaca8ff12dd888b4d294ecb9fef68"
gitlab_x86_64_stretch_source_sha256="c16d69de22fa701dbb4755756544c839ae82a519ac3516901f644add89ff1767"
gitlab_arm_stretch_source_sha256="f24b6f085b1b1a426a277085b51f17d6821aaca8ff12dd888b4d294ecb9fef68"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
if [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
else
gitlab_source_sha256=$gitlab_x86_64_stretch_source_sha256
fi
elif [ "$architecture" = "arm" ]; then
if [ "$gitlab_debian_version" = "buster" ]
then
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
else
gitlab_source_sha256=$gitlab_arm_stretch_source_sha256
fi
fi
gitlab_filename="gitlab-ce-${gitlab_version}.deb"