1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00

Merge branch 'testing-2.4' of https://github.com/YunoHost-Apps/mastodon_ynh into YunoHost-Apps-testing-2.4

This commit is contained in:
nemsia 2018-06-12 23:26:56 +02:00
commit 29c54691fe
8 changed files with 28 additions and 15 deletions

View file

@ -1,10 +1,10 @@
# Mastodon for YunoHost # Mastodon for YunoHost
[![Latest Version](https://img.shields.io/badge/version-2.4.0-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases) [![Latest Version](https://img.shields.io/badge/version-2.4.1-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases)
[![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones) [![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones)
[![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies) [![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies)
[![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE) [![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE)
[![Yunohost version](https://img.shields.io/badge/yunohost-2.7.7_tested-orange.svg?style=flat)](https://github.com/YunoHost/yunohost) [![Yunohost version](https://img.shields.io/badge/yunohost-2.7.12_tested-orange.svg?style=flat)](https://github.com/YunoHost/yunohost)
[![GitHub issues](https://img.shields.io/github/issues/YunoHost-Apps/mastodon_ynh.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/issues) [![GitHub issues](https://img.shields.io/github/issues/YunoHost-Apps/mastodon_ynh.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/issues)
[![Install Mastodon with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=mastodon) [![Install Mastodon with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=mastodon)

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.0.tar.gz SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.1.tar.gz
SOURCE_SUM=3d4904f30c28591333b1cf4c03173849dd6983ab00685f61e50e594160c672ee SOURCE_SUM=d90b573e16359f63f7b2834f1078ecfdd7d78cd5a26acd8293a314dd2b6ff1ec
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -9,7 +9,7 @@
"en": "Mastodon is a free, open-source social network.", "en": "Mastodon is a free, open-source social network.",
"fr": "Mastodon est un réseau social gratuit et open source." "fr": "Mastodon est un réseau social gratuit et open source."
}, },
"version": "2.4.0", "version": "2.4.1",
"url": "https://github.com/tootsuite/mastodon", "url": "https://github.com/tootsuite/mastodon",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"maintainer": { "maintainer": {

View file

@ -33,7 +33,11 @@ app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
final_path=$(ynh_app_setting_get "$app" final_path) final_path=$(ynh_app_setting_get "$app" final_path)
db_name=$(ynh_sanitize_dbid "$app") db_name=$(ynh_app_setting_get "$app" db_name)
if [ -z "$db_name" ]; then
db_name="${app}_production"
ynh_app_setting_set "$app" db_name "$db_name"
fi
#================================================= #=================================================
# STANDARD BACKUP STEPS # STANDARD BACKUP STEPS

View file

@ -124,8 +124,10 @@ ynh_install_app_dependencies \
ynh_psql_test_if_first_run ynh_psql_test_if_first_run
db_user=$(ynh_sanitize_dbid "$app") db_user=$(ynh_sanitize_dbid "$app")
db_name=$(ynh_sanitize_dbid "$app") db_name="${app}_production"
db_name=$(ynh_sanitize_dbid "$db_name")
db_pwd=$(ynh_string_random) db_pwd=$(ynh_string_random)
ynh_app_setting_set $app db_name $db_name
ynh_app_setting_set $app db_pwd $db_pwd ynh_app_setting_set $app db_pwd $db_pwd
ynh_psql_setup_db "$db_user" "$db_name" "$db_pwd" ynh_psql_setup_db "$db_user" "$db_name" "$db_pwd"
@ -220,7 +222,7 @@ sed -i "s@#SMTP_OPENSSL_VERIFY_MODE=peer@SMTP_OPENSSL_VERIFY_MODE=none@g" "${fin
$final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet $final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
yarn install --production --no-progress --non-interactive --silent yarn install --production --no-progress --non-interactive --silent
echo "SAFETY_ASSURED=1">> .env.production echo "SAFETY_ASSURED=1">> .env.production
RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet RAILS_ENV=production $final_path/live/bin/bundle exec rails db:setup --quiet
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
INSTALL INSTALL
) )

View file

@ -22,8 +22,11 @@ app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
db_name=$(ynh_app_setting_get "$app" db_name) db_name=$(ynh_app_setting_get "$app" db_name)
if [ -z "$db_name" ]; then
db_name="${app}_production"
ynh_app_setting_set "$app" db_name "$db_name"
fi
db_user=$(ynh_sanitize_dbid "$app") db_user=$(ynh_sanitize_dbid "$app")
db_name=$(ynh_sanitize_dbid "$app")
final_path=$(ynh_app_setting_get "$app" final_path) final_path=$(ynh_app_setting_get "$app" final_path)
#================================================= #=================================================

View file

@ -89,10 +89,10 @@ fi
# Install source.list debian package backports & yarn # Install source.list debian package backports & yarn
if [ "$(lsb_release --codename --short)" == "jessie" ]; then if [ "$(lsb_release --codename --short)" == "jessie" ]; then
cp ../conf/backports.list /etc/apt/sources.list.d/ cp ../conf/apt_backports.list /etc/apt/sources.list.d/
fi fi
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
cp ../conf/yarn.list /etc/apt/sources.list.d/ cp ../conf/apt_yarn.list /etc/apt/sources.list.d/yarn.list
ynh_package_update ynh_package_update
# Install de Node.js # Install de Node.js
@ -124,7 +124,11 @@ ynh_install_app_dependencies \
# Restore PostgreSQL database # Restore PostgreSQL database
db_user=$(ynh_sanitize_dbid "$app") db_user=$(ynh_sanitize_dbid "$app")
db_name=$(ynh_sanitize_dbid "$app") db_name=$(ynh_app_setting_get "$app" db_name)
if [ -z "$db_name" ]; then
db_name="${app}_production"
ynh_app_setting_set "$app" db_name "$db_name"
fi
db_pwd=$(ynh_app_setting_get "$app" db_pwd) db_pwd=$(ynh_app_setting_get "$app" db_pwd)
ynh_psql_test_if_first_run ynh_psql_test_if_first_run

View file

@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
# See comments in install script # See comments in install script
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
db_name=$app db_name=$(ynh_app_setting_get "$app" db_name)
# Retrieve app settings # Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain) domain=$(ynh_app_setting_get "$app" domain)
@ -31,7 +31,7 @@ path_url="/"
# If db_name doesn't exist, create it # If db_name doesn't exist, create it
if [ -z "$db_name" ]; then if [ -z "$db_name" ]; then
db_name=$(ynh_sanitize_dbid "$app") db_name="${app}_production"
ynh_app_setting_set "$app" db_name "$db_name" ynh_app_setting_set "$app" db_name "$db_name"
fi fi
@ -115,7 +115,7 @@ ynh_setup_source "$final_path/.rbenv/plugins/ruby-build" "app-ruby-build"
# Install ruby 2.5.1 # Install ruby 2.5.1
( (
exec_as "$app" $final_path/.rbenv/bin/rbenv install 2.5.1 || true exec_as "$app" $final_path/.rbenv/bin/rbenv install -s 2.5.1 || true
exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.1 || true exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.1 || true
exec_as "$app" $final_path/.rbenv/versions/2.5.1/bin/ruby -v exec_as "$app" $final_path/.rbenv/versions/2.5.1/bin/ruby -v
) )