mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'dev' into fix_go_helper
This commit is contained in:
commit
23038ea62b
3 changed files with 13 additions and 13 deletions
|
@ -159,7 +159,7 @@ ynh_install_go () {
|
||||||
goenv install --skip-existing "$final_go_version"
|
goenv install --skip-existing "$final_go_version"
|
||||||
|
|
||||||
# Store go_version into the config of this app
|
# Store go_version into the config of this app
|
||||||
ynh_app_setting_set --app="$YNH_APP_INSTANCE_NAME" --key="go_version" --value="$final_go_version"
|
ynh_app_setting_set --app="$app" --key="go_version" --value="$final_go_version"
|
||||||
|
|
||||||
# Cleanup Go versions
|
# Cleanup Go versions
|
||||||
ynh_cleanup_go
|
ynh_cleanup_go
|
||||||
|
@ -181,7 +181,7 @@ eval \"\$(goenv init -)\"
|
||||||
#
|
#
|
||||||
# usage: ynh_remove_go
|
# usage: ynh_remove_go
|
||||||
ynh_remove_go () {
|
ynh_remove_go () {
|
||||||
local go_version=$(ynh_app_setting_get --app="$YNH_APP_INSTANCE_NAME" --key="go_version")
|
local go_version=$(ynh_app_setting_get --app="$app" --key="go_version")
|
||||||
|
|
||||||
# Load goenv path in PATH
|
# Load goenv path in PATH
|
||||||
local CLEAR_PATH="$goenv_install_dir/bin:$PATH"
|
local CLEAR_PATH="$goenv_install_dir/bin:$PATH"
|
||||||
|
@ -190,7 +190,7 @@ ynh_remove_go () {
|
||||||
PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@')
|
PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@')
|
||||||
|
|
||||||
# Remove the line for this app
|
# Remove the line for this app
|
||||||
ynh_app_setting_delete --app="$YNH_APP_INSTANCE_NAME" --key="go_version"
|
ynh_app_setting_delete --app="$app" --key="go_version"
|
||||||
|
|
||||||
# Cleanup Go versions
|
# Cleanup Go versions
|
||||||
ynh_cleanup_go
|
ynh_cleanup_go
|
||||||
|
|
|
@ -144,7 +144,7 @@ ynh_install_nodejs() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Store the ID of this app and the version of node requested for it
|
# Store the ID of this app and the version of node requested for it
|
||||||
echo "$YNH_APP_INSTANCE_NAME:$nodejs_version" | tee --append "$n_install_dir/ynh_app_version"
|
echo "$app:$nodejs_version" | tee --append "$n_install_dir/ynh_app_version"
|
||||||
|
|
||||||
# Store nodejs_version into the config of this app
|
# Store nodejs_version into the config of this app
|
||||||
ynh_app_setting_set --app=$app --key=nodejs_version --value=$nodejs_version
|
ynh_app_setting_set --app=$app --key=nodejs_version --value=$nodejs_version
|
||||||
|
@ -168,7 +168,7 @@ ynh_remove_nodejs() {
|
||||||
nodejs_version=$(ynh_app_setting_get --app=$app --key=nodejs_version)
|
nodejs_version=$(ynh_app_setting_get --app=$app --key=nodejs_version)
|
||||||
|
|
||||||
# Remove the line for this app
|
# Remove the line for this app
|
||||||
sed --in-place "/$YNH_APP_INSTANCE_NAME:$nodejs_version/d" "$n_install_dir/ynh_app_version"
|
sed --in-place "/$app:$nodejs_version/d" "$n_install_dir/ynh_app_version"
|
||||||
|
|
||||||
# If no other app uses this version of nodejs, remove it.
|
# If no other app uses this version of nodejs, remove it.
|
||||||
if ! grep --quiet "$nodejs_version" "$n_install_dir/ynh_app_version"; then
|
if ! grep --quiet "$nodejs_version" "$n_install_dir/ynh_app_version"; then
|
||||||
|
|
|
@ -54,7 +54,7 @@ ynh_use_ruby () {
|
||||||
ruby_version=$(ynh_app_setting_get --app=$app --key=ruby_version)
|
ruby_version=$(ynh_app_setting_get --app=$app --key=ruby_version)
|
||||||
|
|
||||||
# Get the absolute path of this version of Ruby
|
# Get the absolute path of this version of Ruby
|
||||||
ruby_path="$ruby_version_path/$YNH_APP_INSTANCE_NAME/bin"
|
ruby_path="$ruby_version_path/$app/bin"
|
||||||
|
|
||||||
# Allow alias to be used into bash script
|
# Allow alias to be used into bash script
|
||||||
shopt -s expand_aliases
|
shopt -s expand_aliases
|
||||||
|
@ -207,16 +207,16 @@ ynh_install_ruby () {
|
||||||
RUBY_CONFIGURE_OPTS="--disable-install-doc --with-jemalloc" MAKE_OPTS="-j2" rbenv install --skip-existing $final_ruby_version > /dev/null 2>&1
|
RUBY_CONFIGURE_OPTS="--disable-install-doc --with-jemalloc" MAKE_OPTS="-j2" rbenv install --skip-existing $final_ruby_version > /dev/null 2>&1
|
||||||
|
|
||||||
# Store ruby_version into the config of this app
|
# Store ruby_version into the config of this app
|
||||||
ynh_app_setting_set --app=$YNH_APP_INSTANCE_NAME --key=ruby_version --value=$final_ruby_version
|
ynh_app_setting_set --app=$app --key=ruby_version --value=$final_ruby_version
|
||||||
|
|
||||||
# Remove app virtualenv
|
# Remove app virtualenv
|
||||||
if rbenv alias --list | grep --quiet "$YNH_APP_INSTANCE_NAME "
|
if rbenv alias --list | grep --quiet "$app "
|
||||||
then
|
then
|
||||||
rbenv alias $YNH_APP_INSTANCE_NAME --remove
|
rbenv alias $app --remove
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create app virtualenv
|
# Create app virtualenv
|
||||||
rbenv alias $YNH_APP_INSTANCE_NAME $final_ruby_version
|
rbenv alias $app $final_ruby_version
|
||||||
|
|
||||||
# Cleanup Ruby versions
|
# Cleanup Ruby versions
|
||||||
ynh_cleanup_ruby
|
ynh_cleanup_ruby
|
||||||
|
@ -238,7 +238,7 @@ eval \"\$(rbenv init -)\"
|
||||||
#
|
#
|
||||||
# usage: ynh_remove_ruby
|
# usage: ynh_remove_ruby
|
||||||
ynh_remove_ruby () {
|
ynh_remove_ruby () {
|
||||||
local ruby_version=$(ynh_app_setting_get --app=$YNH_APP_INSTANCE_NAME --key=ruby_version)
|
local ruby_version=$(ynh_app_setting_get --app=$app --key=ruby_version)
|
||||||
|
|
||||||
# Load rbenv path in PATH
|
# Load rbenv path in PATH
|
||||||
local CLEAR_PATH="$rbenv_install_dir/bin:$PATH"
|
local CLEAR_PATH="$rbenv_install_dir/bin:$PATH"
|
||||||
|
@ -246,10 +246,10 @@ ynh_remove_ruby () {
|
||||||
# Remove /usr/local/bin in PATH in case of Ruby prior installation
|
# Remove /usr/local/bin in PATH in case of Ruby prior installation
|
||||||
PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@')
|
PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@')
|
||||||
|
|
||||||
rbenv alias $YNH_APP_INSTANCE_NAME --remove
|
rbenv alias $app --remove
|
||||||
|
|
||||||
# Remove the line for this app
|
# Remove the line for this app
|
||||||
ynh_app_setting_delete --app=$YNH_APP_INSTANCE_NAME --key=ruby_version
|
ynh_app_setting_delete --app=$app --key=ruby_version
|
||||||
|
|
||||||
# Cleanup Ruby versions
|
# Cleanup Ruby versions
|
||||||
ynh_cleanup_ruby
|
ynh_cleanup_ruby
|
||||||
|
|
Loading…
Add table
Reference in a new issue