mirror of
https://github.com/YunoHost-Apps/terraforming-mars_ynh.git
synced 2024-09-03 20:36:05 +02:00
some fixes and install by commit version
This commit is contained in:
parent
ec278324ef
commit
5b61fb3dd2
3 changed files with 14 additions and 35 deletions
|
@ -7,6 +7,9 @@
|
|||
# nodejs version
|
||||
nodejs_version=16
|
||||
|
||||
# Terraforming-mars commit
|
||||
TM_version="a36d327"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -19,19 +19,6 @@ 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
|
||||
#=================================================
|
||||
|
@ -48,7 +35,8 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
|
||||
cd $install_dir
|
||||
git clone https://github.com/terraforming-mars/terraforming-mars.git
|
||||
ynh_exec_warn_less git clone https://github.com/terraforming-mars/terraforming-mars.git
|
||||
git checkout $TM_version
|
||||
|
||||
pushd $install_dir/terraforming-mars
|
||||
ynh_use_nodejs
|
||||
|
|
|
@ -30,35 +30,23 @@ ynh_npm install --global npm@6.14.18
|
|||
|
||||
#=================================================
|
||||
# "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...)
|
||||
#=================================================
|
||||
# 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" --full-replace=1
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# BUILD APP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building app... This may take quiete some time" --weight=30
|
||||
|
||||
pushd $install_dir
|
||||
cd $install_dir
|
||||
ynh_exec_warn_less git clone https://github.com/terraforming-mars/terraforming-mars.git
|
||||
git checkout $TM_version
|
||||
|
||||
pushd $install_dir/terraforming-mars
|
||||
ynh_use_nodejs
|
||||
|
||||
ynh_script_progression --message="Fetching Yarn dev dependencies... This can be very long, be patient !" --weight=18
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install --network-timeout=100000
|
||||
|
||||
ynh_script_progression --message="Building Yarn dev dependencies... This can be very long, be patient !" --weight=25
|
||||
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn run build
|
||||
|
||||
ynh_script_progression --message="Cleaning cache... " --weight=3
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn cache clean 2>&1
|
||||
ynh_script_progression --message="npm install... This can be very long, be patient !" --weight=18
|
||||
ynh_exec_warn_less env $ynh_node_load_PATH $ynh_npm install --network-timeout=100000
|
||||
|
||||
ynh_script_progression --message="npm run build... This can be very long, be patient !" --weight=25
|
||||
ynh_exec_warn_less env $ynh_node_load_PATH $ynh_npm run build
|
||||
popd
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
|
|
Loading…
Reference in a new issue