mirror of
https://github.com/YunoHost-Apps/discourse_ynh.git
synced 2024-09-03 18:26:18 +02:00
Upgrade Ruby
This commit is contained in:
parent
6f63ea277e
commit
9c8549fa0f
3 changed files with 13 additions and 13 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
pkg_dependencies="g++ libjemalloc1|libjemalloc2 libjemalloc-dev zlib1g-dev libreadline-dev libpq-dev libssl-dev libyaml-dev libcurl4-openssl-dev libapr1-dev libxslt1-dev libxml2-dev vim imagemagick postgresql postgresql-server-dev-all postgresql-contrib optipng jhead jpegoptim gifsicle brotli"
|
||||
|
||||
RUBY_VERSION="2.7.1"
|
||||
RUBY_VERSION="3.0.1"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
@ -171,8 +171,8 @@ SOURCE_SUM=80ad89ffe04c0b481503bd375f05c212bbc7d44ef5f5e649e0acdf25eba86736" > "
|
|||
|
||||
# Build an app.src for ruby-build
|
||||
mkdir -p "../conf"
|
||||
echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20200520.tar.gz
|
||||
SOURCE_SUM=52be6908a94fbd4a94f5064e8b19d4a3baa4b773269c3884165518d83bcc8922" > "../conf/ruby-build.src"
|
||||
echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/refs/tags/v20210526.tar.gz
|
||||
SOURCE_SUM=1d311dfa06061163769ad332df8041039f98ae6bc9bc7847f2187b5591e59666" > "../conf/ruby-build.src"
|
||||
# Download and extract ruby-build
|
||||
ynh_setup_source "$rbenv_install_dir/plugins/ruby-build" ruby-build
|
||||
|
||||
|
@ -231,7 +231,7 @@ ynh_install_ruby () {
|
|||
elif dpkg --compare-versions "$($rbenv_install_dir/bin/rbenv --version | cut -d" " -f2)" lt "1.1.2"
|
||||
then
|
||||
ynh_install_rbenv
|
||||
elif dpkg --compare-versions "$($rbenv_install_dir/plugins/ruby-build/bin/ruby-build --version | cut -d" " -f2)" lt "20200520"
|
||||
elif dpkg --compare-versions "$($rbenv_install_dir/plugins/ruby-build/bin/ruby-build --version | cut -d" " -f2)" lt "20210526"
|
||||
then
|
||||
ynh_install_rbenv
|
||||
fi
|
||||
|
|
|
@ -159,7 +159,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -92,6 +92,14 @@ ynh_script_progression --message="Stopping a systemd service..."
|
|||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="$final_path/log/unicorn.stderr.log"
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path --use_shell
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -183,14 +191,6 @@ ynh_script_progression --message="Installing Ruby..."
|
|||
|
||||
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path --use_shell
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue