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

Add arm64 support

This commit is contained in:
Kay0u 2021-03-29 11:46:48 +02:00
parent 6e2bf6a10d
commit c62229004e
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
4 changed files with 18 additions and 4 deletions

View file

@ -43,8 +43,8 @@ final_path=/opt/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Detect the system architecture
if [ -n "$(uname -m | grep aarch64)" ]; then
ynh_die "Gitlab is not compatible with arm64 architecture"
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep x86_64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then

View file

@ -76,8 +76,8 @@ fi
# If architecture doesn't exist, create it
if [ -z "$architecture" ]; then
if [ -n "$(uname -m | grep aarch64)" ]; then
ynh_die "Gitlab is not compatible with arm64 architecture"
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep x86_64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then

View file

@ -7,12 +7,16 @@ gitlab_debian_version="buster"
gitlab_x86_64_buster_source_sha256="85a02b3fa8bfa5ec2a69ef039e2dd787ad317d920c05b697be314e3e74542190"
gitlab_arm64_buster_source_sha256="fb7a1e4ef95651211f4327cbe1680bdd59c039365f83f1d47a319176f796f824"
gitlab_arm_buster_source_sha256="1613a02e2925af265ddbdf809d3614cc609d7dc037a82f6bdcbf285bf76494dd"
architecture=$(ynh_app_setting_get --app="$app" --key=architecture)
if [ "$architecture" = "x86-64" ]; then
gitlab_source_sha256=$gitlab_x86_64_buster_source_sha256
elif [ "$architecture" = "arm64" ]; then
gitlab_source_sha256=$gitlab_arm64_buster_source_sha256
elif [ "$architecture" = "arm" ]; then
gitlab_source_sha256=$gitlab_arm_buster_source_sha256
fi

View file

@ -24,6 +24,16 @@ echo sha256: $new_sha256
sed -i -e "s/gitlab_x86_64_buster_source_sha256=\".*\"/gitlab_x86_64_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file
# arm64
url=https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/buster/gitlab-ce_$version-ce.0_arm64.deb
new_sha256=$(curl -s $url | sed -n '/SHA256$/,/<\/tr>$/{ /SHA256$/d; /<\/tr>$/d; p; }' | cut -d$'\n' -f3 | xargs)
echo url: $url
echo sha256: $new_sha256
sed -i -e "s/gitlab_arm64_buster_source_sha256=\".*\"/gitlab_arm64_buster_source_sha256=\"$new_sha256\"/" $gitlab_directory/scripts/upgrade.d/$file
# arm
url=https://packages.gitlab.com/gitlab/raspberry-pi2/packages/raspbian/buster/gitlab-ce_$version-ce.0_armhf.deb