1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/terraforming-mars_ynh.git synced 2024-09-03 20:36:05 +02:00

init ynh_setup_source

This commit is contained in:
Thomas 2023-12-12 14:16:48 +01:00 committed by GitHub
parent 2bd31239dc
commit 0a5c147d7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 6 deletions

View file

@ -41,6 +41,13 @@ ram.runtime = "50M"
default = "visitors" default = "visitors"
[resources] [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] [resources.system_user]

View file

@ -19,6 +19,18 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
# Upgrade NPM # Upgrade NPM
ynh_npm install --global npm@6.14.18 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 # NGINX CONFIGURATION
#================================================= #=================================================
@ -34,12 +46,6 @@ ynh_add_nginx_config
# BUILD APP # 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 pushd $install_dir/terraforming-mars
ynh_use_nodejs ynh_use_nodejs