From c4b86c53ba6ab14cd6be4d94cb0a9d4d536c1080 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 13 Mar 2021 14:09:06 +0100 Subject: [PATCH] Implement GO_VERSION --- scripts/_common.sh | 2 ++ scripts/install | 6 ++++-- scripts/remove | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 666a781..00d6442 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,6 +7,8 @@ # dependencies used by the app pkg_dependencies="git" +GO_VERSION="1.15" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 7aef820..b3b7ac0 100644 --- a/scripts/install +++ b/scripts/install @@ -79,7 +79,7 @@ ynh_exec_warn_less yunohost firewall allow TCP $sync_port ynh_script_progression --message="Installing dependencies..." ynh_install_app_dependencies $pkg_dependencies -ynh_install_go --go_version="1.15" +ynh_install_go --go_version=$GO_VERSION #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -114,8 +114,9 @@ ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # SPECIFIC SETUP #================================================= -# ... +# BUILDING SYNCTHING #================================================= +ynh_script_progression --message="Building Syncthing..." pushd "$final_path/dev" ynh_use_go @@ -124,6 +125,7 @@ popd mv "$final_path/dev/bin/syncthing" "$final_path/syncthing" ynh_secure_remove --file="$final_path/dev" +ynh_remove_go #================================================= # CREATE SYNC DIRECTORY diff --git a/scripts/remove b/scripts/remove index 537cafe..856bf56 100644 --- a/scripts/remove +++ b/scripts/remove @@ -49,7 +49,6 @@ ynh_remove_systemd_config ynh_script_progression --message="Removing dependencies..." # Remove metapackage and its dependencies -ynh_remove_go ynh_remove_app_dependencies #=================================================