diff --git a/README.md b/README.md index 91526cc..3a76e7d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features. -**Shipped version:** 14.0.0~ynh1 +**Shipped version:** 14.0.4~ynh1 **Demo:** https://gitlab.com/explore diff --git a/README_fr.md b/README_fr.md index 011e16d..f5fca20 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD. -**Version incluse :** 14.0.0~ynh1 +**Version incluse :** 14.0.4~ynh1 **Démo :** https://gitlab.com/explore diff --git a/manifest.json b/manifest.json index 3547653..7c56d51 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "GitLab", "id": "gitlab", "packaging_format": 1, - "version": "14.0.0~ynh1", + "version": "14.0.4~ynh1", "description": { "en": "Git-repository manager providing wiki, issue-tracking and CI/CD pipeline features.", "fr": "Gestionnaire de dépôts Git proposant des fonctionnalités de wiki, suivi de bugs et de pipeline CI/CD." diff --git a/scripts/upgrade.d/upgrade.last.sh b/scripts/upgrade.d/upgrade.last.sh index 12c61c9..b28fb02 100644 --- a/scripts/upgrade.d/upgrade.last.sh +++ b/scripts/upgrade.d/upgrade.last.sh @@ -1,15 +1,15 @@ #!/bin/bash -gitlab_version="14.0.0" +gitlab_version="14.0.4" # sha256sum found here: https://packages.gitlab.com/gitlab gitlab_debian_version="buster" -gitlab_x86_64_buster_source_sha256="fc395f2f6150ab081dfb5ab012c2273be4d15d3d0dd4b9cc07aa793dcf27c67b" +gitlab_x86_64_buster_source_sha256="110157284f221cd0881be3ff13698d29e4ab7727dd2d6db61f1d85e446b4527f" -gitlab_arm64_buster_source_sha256="aa2924f935e02e06f52320795e2d4839181ea0d0d410786f44ae4df86d2fc90d" +gitlab_arm64_buster_source_sha256="7aded3999c34ed7927e63da481a09179488647735c235927bb6193af0aa77131" -gitlab_arm_buster_source_sha256="3b52c9d414974b2c6c639f881e2c736c9790eac16fcb070ce82bcce52b8958a2" +gitlab_arm_buster_source_sha256="" architecture=$(ynh_app_setting_get --app="$app" --key=architecture) @@ -18,6 +18,11 @@ if [ "$architecture" = "x86-64" ]; then elif [ "$architecture" = "arm64" ]; then gitlab_source_sha256=$gitlab_arm64_buster_source_sha256 elif [ "$architecture" = "arm" ]; then + # If the version for arm doesn't exist, then use an older one + if [ -z "$gitlab_arm_buster_source_sha256" ]; then + gitlab_version="14.0.0" + gitlab_arm_buster_source_sha256="3b52c9d414974b2c6c639f881e2c736c9790eac16fcb070ce82bcce52b8958a2" + fi gitlab_source_sha256=$gitlab_arm_buster_source_sha256 fi diff --git a/upgrade-versions.sh b/upgrade-versions.sh index cc615f4..7888d67 100755 --- a/upgrade-versions.sh +++ b/upgrade-versions.sh @@ -12,7 +12,8 @@ version=$2 current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" gitlab_directory="$( cd "$( dirname "$current_dir/$1" )/../../" >/dev/null 2>&1 && pwd )" -sed -i -e "s/gitlab_version=\"[^0-9.]*[0-9.]*[0-9.]\"/gitlab_version=\"$version\"/" $gitlab_directory/scripts/upgrade.d/$file +# Only replace the first occurrence +sed -i -e "0,/gitlab_version=\"[^0-9.]*[0-9.]*[0-9.]\"/s//gitlab_version=\"$version\"/" $gitlab_directory/scripts/upgrade.d/$file # x86_64 url=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/buster/gitlab-ce_$version-ce.0_amd64.deb @@ -42,7 +43,15 @@ new_sha256=$(curl -s $url | sed -n '/SHA256$/,/<\/tr>$/{ /SHA256$/d; /<\/tr>$/d; echo url: $url echo sha256: $new_sha256 -sed -i -e "s/gitlab_arm_buster_source_sha256=\".*\"/gitlab_arm_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file +# Only replace the first occurrence +sed -i -e "0,/gitlab_arm_buster_source_sha256=\".*\"/s//gitlab_arm_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file + +# if new_sha256 exists for arm, then replace the backup version/sha256 for this arch +if [ -n "$new_sha256" ]; then + sed -i -e "s/gitlab_version=\"[^0-9.]*[0-9.]*[0-9.]\"/gitlab_version=\"$version\"/" $gitlab_directory/scripts/upgrade.d/$file + sed -i -e "s/gitlab_arm_buster_source_sha256=\".*\"/gitlab_arm_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file +fi + if [[ "$(basename $file)" == upgrade.last.sh ]]; then # Update manifest