diff --git a/manifest.toml b/manifest.toml index 18d0b4f..181e616 100644 --- a/manifest.toml +++ b/manifest.toml @@ -41,6 +41,13 @@ ram.runtime = "50M" default = "visitors" [resources] + + [resources.sources] + + [resources.sources.main] + url = "https://codeload.github.com/terraforming-mars/terraforming-mars/tar.gz/78e5e5d0433e4d1632639ea7da1a1993672bd82a" + sha256 = "b41cfe80334495a4653bc3933298597c232474c309c5993e388068e33d7f13ce" + autoupdate.strategy = "latest_github_tag" [resources.system_user] diff --git a/scripts/install b/scripts/install index e168d09..128606d 100755 --- a/scripts/install +++ b/scripts/install @@ -19,6 +19,18 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version # Upgrade NPM ynh_npm install --global npm@6.14.18 +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_script_progression --message="Setting up source files..." --weight=1 + +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" + +chmod 750 "$install_dir" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" + #================================================= # NGINX CONFIGURATION #================================================= @@ -34,12 +46,6 @@ ynh_add_nginx_config # BUILD APP #================================================= -cd $install_dir -ynh_exec_warn_less git clone https://github.com/terraforming-mars/terraforming-mars.git - -cd $install_dir/terraforming-mars -ynh_exec_warn_less git checkout $TM_version - pushd $install_dir/terraforming-mars ynh_use_nodejs