mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Change arm64 source (#409)
* add entreprise for arm64, use the official build for arm64 * Auto-update README * update auto-updater script --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
This commit is contained in:
parent
ec8fa5570a
commit
386cdb633d
14 changed files with 50 additions and 31 deletions
21
.github/workflows/updater.sh
vendored
21
.github/workflows/updater.sh
vendored
|
@ -26,10 +26,12 @@ if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
|||
version=${version:1}
|
||||
fi
|
||||
|
||||
# x86-64 and enterprise assets are hosted on Mattermost's servers.
|
||||
# x86-64 team, x86-64 enterprise, ARM64 team and ARM64 enterprise assets are hosted on Mattermost's servers.
|
||||
assets=()
|
||||
assets+=("https://releases.mattermost.com/$version/mattermost-team-$version-linux-amd64.tar.gz")
|
||||
assets+=("https://releases.mattermost.com/$version/mattermost-enterprise-$version-linux-amd64.tar.gz")
|
||||
assets+=("https://releases.mattermost.com/$version/mattermost-team-$version-linux-arm64.tar.gz")
|
||||
assets+=("https://releases.mattermost.com/$version/mattermost-enterprise-$version-linux-arm64.tar.gz")
|
||||
|
||||
# ARM and ARM64 are published in another repository (with a leading "v" for version tags)
|
||||
other_repo="SmartHoneybee/ubiquitous-memory"
|
||||
|
@ -79,16 +81,19 @@ echo "Handling asset at $asset_url"
|
|||
# Leave $src empty to ignore the asset
|
||||
case $asset_url in
|
||||
*"mattermost-"*"-linux-arm.tar.gz")
|
||||
src="armhf"
|
||||
src="team_armhf"
|
||||
;;
|
||||
*"mattermost-"*"-linux-arm64.tar.gz")
|
||||
src="arm64"
|
||||
;;
|
||||
*"mattermost-team-"*"-linux-amd64.tar.gz")
|
||||
src="amd64"
|
||||
*"mattermost-team-"*"-linux-arm64.tar.gz")
|
||||
src="team_arm64"
|
||||
;;
|
||||
*"mattermost-enterprise-"*"-linux-amd64.tar.gz")
|
||||
src="enterprise"
|
||||
src="enterprise_amd64"
|
||||
;;
|
||||
*"mattermost-team-"*"-linux-amd64.tar.gz")
|
||||
src="team_amd64"
|
||||
;;
|
||||
*"mattermost-enterprise-"*"-linux-amd64.tar.gz")
|
||||
src="enterprise_amd64"
|
||||
;;
|
||||
*)
|
||||
src=""
|
||||
|
|
|
@ -61,7 +61,7 @@ Mattermost Mobile and Desktop Apps are available [here](https://mattermost.com/d
|
|||
|
||||
## Additional information
|
||||
|
||||
* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` if you choose to install the *Entreprise Edition*).
|
||||
* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` and `ARM64` if you choose to install the *Entreprise Edition*).
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ Ce paquet peut installer la version [*Entreprise Edition*](https://docs.mattermo
|
|||
|
||||
## Informations additionnelles
|
||||
|
||||
Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` si vous choisissez d'installer la version *Enterprise Edition*).
|
||||
Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` et `ARM64` si vous choisissez d'installer la version *Enterprise Edition*).
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ module Mattermost
|
|||
|
||||
def retrieve_release_data
|
||||
case @variant
|
||||
when :amd64, :enterprise
|
||||
when :team_amd64, :team_arm64, :enterprise_amd64, :enterprise_arm64
|
||||
retrieve_first_party_release_data
|
||||
when :armhf, :arm64
|
||||
when :team_armhf
|
||||
retrieve_smart_honeybee_release_data
|
||||
else
|
||||
raise "Unsupported variant '{#release_desc.variant}'"
|
||||
|
@ -47,21 +47,29 @@ module Mattermost
|
|||
|
||||
def retrieve_first_party_release_data
|
||||
edition = {
|
||||
amd64: 'team',
|
||||
enterprise: 'enterprise'
|
||||
team_amd64: 'team',
|
||||
team_arm64: 'team',
|
||||
enterprise_amd64: 'enterprise',
|
||||
enterprise_arm64: 'enterprise'
|
||||
}.fetch(variant)
|
||||
|
||||
@url = "https://releases.mattermost.com/#{version}/mattermost-#{edition}-#{version}-linux-amd64.tar.gz"
|
||||
arch = {
|
||||
team_amd64: 'amd64',
|
||||
team_arm64: 'arm64',
|
||||
enterprise_amd64: 'amd64',
|
||||
enterprise_arm64: 'arm64'
|
||||
}.fetch(variant)
|
||||
|
||||
puts "Downloading release #{version}-#{variant} for computing checksum…"
|
||||
@url = "https://releases.mattermost.com/#{version}/mattermost-#{edition}-#{version}-linux-#{arch}.tar.gz"
|
||||
|
||||
puts "Downloading release #{version}-#{edition}-#{arch} for computing checksum…"
|
||||
release_file = URI.parse(@url).read
|
||||
@sum = Digest::SHA256.hexdigest(release_file)
|
||||
end
|
||||
|
||||
def retrieve_smart_honeybee_release_data
|
||||
arch = {
|
||||
armhf: 'arm',
|
||||
arm64: 'arm64'
|
||||
team_armhf: 'arm',
|
||||
}.fetch(variant)
|
||||
|
||||
@url = "https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v#{version}/mattermost-v#{version}-linux-#{arch}.tar.gz"
|
||||
|
@ -127,7 +135,7 @@ if version.nil?
|
|||
abort("ERROR: The Mattermost release version must be provided.\nExample: ./bump-mattermost.sh 5.33.1")
|
||||
end
|
||||
|
||||
VARIANTS = %i[amd64 enterprise armhf arm64]
|
||||
VARIANTS = %i[team_amd64 enterprise_amd64 enterprise_arm64 team_arm64 team_armhf]
|
||||
|
||||
# Compute releases URLs and sums
|
||||
releases = VARIANTS
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/SmartHoneybee/ubiquitous-memory/releases/download/v7.5.2/mattermost-v7.5.2-linux-arm64.tar.gz
|
||||
SOURCE_SUM=85fac79f33d83b7f95b2532a055bbebecb28c60d6c1d955d9613de698d69b29e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=mattermost.tar.gz
|
6
conf/enterprise_arm64.src
Normal file
6
conf/enterprise_arm64.src
Normal file
|
@ -0,0 +1,6 @@
|
|||
SOURCE_URL=https://releases.mattermost.com/7.5.2/mattermost-enterprise-7.5.2-linux-arm64.tar.gz
|
||||
SOURCE_SUM=2aa9aaf3d599a38682dbb9a2c76b277c85976dd0d331f2d563b51dd58ac141aa
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=mattermost.tar.gz
|
6
conf/team_arm64.src
Normal file
6
conf/team_arm64.src
Normal file
|
@ -0,0 +1,6 @@
|
|||
SOURCE_URL=https://releases.mattermost.com/7.5.2/mattermost-team-7.5.2-linux-arm64.tar.gz
|
||||
SOURCE_SUM=39281870a69eccd7876f3c25c69ffae2b87a6920519b74a8eed25c553e06e80c
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=mattermost.tar.gz
|
|
@ -15,4 +15,4 @@ Mattermost Mobile and Desktop Apps are available [here](https://mattermost.com/d
|
|||
|
||||
## Additional information
|
||||
|
||||
* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` if you choose to install the *Entreprise Edition*).
|
||||
* This package can by installed on `ARM`, `ARM64` and `x86-64` architecture (only `x86-64` and `ARM64` if you choose to install the *Entreprise Edition*).
|
||||
|
|
|
@ -13,4 +13,4 @@ Ce paquet peut installer la version [*Entreprise Edition*](https://docs.mattermo
|
|||
|
||||
## Informations additionnelles
|
||||
|
||||
Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` si vous choisissez d'installer la version *Enterprise Edition*).
|
||||
Ce paquet peut être installé sur les architectures `ARM`, `ARM64` et `x86-64` (mais uniquement `x86-64` et `ARM64` si vous choisissez d'installer la version *Enterprise Edition*).
|
||||
|
|
|
@ -104,10 +104,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
|
||||
if [ "$version" = "Enterprise" ]; then
|
||||
# Get Enterprise binary path
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="enterprise"
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="enterprise_$YNH_ARCH"
|
||||
elif [ "$version" = "Team" ]; then
|
||||
# Get Team binary path
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH"
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="team_$YNH_ARCH"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
|
|
|
@ -157,9 +157,9 @@ then
|
|||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
if [ "$version" = "Enterprise" ]; then
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="enterprise"
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="enterprise_$YNH_ARCH"
|
||||
elif [ "$version" = "Team" ]; then
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$YNH_ARCH"
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="team_$YNH_ARCH"
|
||||
fi
|
||||
|
||||
# Copy the admin saved settings and plugins from tmp directory to final path
|
||||
|
|
Loading…
Reference in a new issue