1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diaspora_ynh.git synced 2024-09-03 18:26:13 +02:00

Merge remote-tracking branch 'origin/fix_node_version' into example

This commit is contained in:
yalh76 2022-05-28 01:49:34 +02:00
commit f620f2571e
8 changed files with 53 additions and 32 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Diaspora for YunoHost # Diaspora for YunoHost
[![Integration level](https://dash.yunohost.org/integration/diaspora.svg)](https://dash.yunohost.org/appci/app/diaspora) ![](https://ci-apps.yunohost.org/ci/badges/diaspora.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/diaspora.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/diaspora.svg)](https://dash.yunohost.org/appci/app/diaspora) ![Working status](https://ci-apps.yunohost.org/ci/badges/diaspora.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/diaspora.maintain.svg)
[![Install Diaspora with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=diaspora) [![Install Diaspora with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=diaspora)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -18,9 +18,6 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Distributed social networking service Distributed social networking service
**Shipped version:** 0.7.17.0~ynh1 **Shipped version:** 0.7.17.0~ynh1
## Disclaimers / important information ## Disclaimers / important information
- There is currently no LDAP integration - There is currently no LDAP integration
@ -30,22 +27,23 @@ Distributed social networking service
## Documentation and resources ## Documentation and resources
* Official app website: https://diasporafoundation.org/ * Official app website: <https://diasporafoundation.org/>
* Official user documentation: https://wiki.diasporafoundation.org/FAQ_for_users * Official user documentation: <https://wiki.diasporafoundation.org/FAQ_for_users>
* Official admin documentation: https://wiki.diasporafoundation.org/FAQ_for_pod_maintainers * Official admin documentation: <https://wiki.diasporafoundation.org/FAQ_for_pod_maintainers>
* Upstream app code repository: https://github.com/diaspora/diaspora * Upstream app code repository: <https://github.com/diaspora/diaspora>
* YunoHost documentation for this app: https://yunohost.org/app_diaspora * YunoHost documentation for this app: <https://yunohost.org/app_diaspora>
* Report a bug: https://github.com/YunoHost-Apps/diaspora_ynh/issues * Report a bug: <https://github.com/YunoHost-Apps/diaspora_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug
or or
sudo yunohost app upgrade diaspora -u https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug sudo yunohost app upgrade diaspora -u https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Diaspora pour YunoHost # Diaspora pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/diaspora.svg)](https://dash.yunohost.org/appci/app/diaspora) ![](https://ci-apps.yunohost.org/ci/badges/diaspora.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/diaspora.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/diaspora.svg)](https://dash.yunohost.org/appci/app/diaspora) ![Status du fonctionnement](https://ci-apps.yunohost.org/ci/badges/diaspora.status.svg) ![Status de maintenance](https://ci-apps.yunohost.org/ci/badges/diaspora.maintain.svg)
[![Installer Diaspora avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=diaspora) [![Installer Diaspora avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=diaspora)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Diaspora rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer Diaspora rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
@ -14,9 +18,6 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Service de réseau social distribué Service de réseau social distribué
**Version incluse :** 0.7.17.0~ynh1 **Version incluse :** 0.7.17.0~ynh1
## Avertissements / informations importantes ## Avertissements / informations importantes
- Il n'y a pas d'intégration LDAP pour le moment. - Il n'y a pas d'intégration LDAP pour le moment.
@ -26,22 +27,23 @@ Service de réseau social distribué
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : https://diasporafoundation.org/ * Site officiel de l'app : <https://diasporafoundation.org/>
* Documentation officielle utilisateur : https://wiki.diasporafoundation.org/FAQ_for_users * Documentation officielle utilisateur : <https://wiki.diasporafoundation.org/FAQ_for_users>
* Documentation officielle de l'admin : https://wiki.diasporafoundation.org/FAQ_for_pod_maintainers * Documentation officielle de l'admin : <https://wiki.diasporafoundation.org/FAQ_for_pod_maintainers>
* Dépôt de code officiel de l'app : https://github.com/diaspora/diaspora * Dépôt de code officiel de l'app : <https://github.com/diaspora/diaspora>
* Documentation YunoHost pour cette app : https://yunohost.org/app_diaspora * Documentation YunoHost pour cette app : <https://yunohost.org/app_diaspora>
* Signaler un bug : https://github.com/YunoHost-Apps/diaspora_ynh/issues * Signaler un bug : <https://github.com/YunoHost-Apps/diaspora_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade diaspora -u https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug sudo yunohost app upgrade diaspora -u https://github.com/YunoHost-Apps/diaspora_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps **Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
pkg_dependencies="build-essential cmake libssl-dev libcurl4-dev libxml2-dev libxslt-dev imagemagick ghostscript curl libmagickwand-dev git libpq-dev redis-server nodejs postgresql bison " pkg_dependencies="build-essential cmake libssl-dev libcurl4-dev libxml2-dev libxslt-dev imagemagick ghostscript curl libmagickwand-dev git libpq-dev redis-server postgresql bison "
ruby_build_dependencies="bison libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libyaml-dev pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev libjemalloc-dev" ruby_build_dependencies="bison libffi-dev libgdbm-dev libncurses5-dev libsqlite3-dev libyaml-dev pkg-config sqlite3 zlib1g-dev libgmp-dev libreadline-dev libssl-dev libjemalloc-dev"
current_tag="v0.7.17.0" current_tag="v0.7.17.0"

View file

@ -9,7 +9,9 @@ bin/bundle install --full-index --with=postgresql
EOF EOF
# for some reason rake logs a lot in stderr (tried --quiet, didn't change anything) # for some reason rake logs a lot in stderr (tried --quiet, didn't change anything)
# redirecting it to stdout to have a saner log on yunohost side # redirecting it to stdout to have a saner log on yunohost side
sudo -u $app --login << EOF sudo -u $app /bin/bash -l << EOF
source /usr/share/yunohost/helpers
ynh_use_nodejs
cd diaspora cd diaspora
RAILS_ENV=production bundle exec rake db:migrate 2>&1 RAILS_ENV=production bundle exec rake db:migrate 2>&1
EOF EOF
@ -18,7 +20,9 @@ EOF
# ASSETS PRECOMPILATION # ASSETS PRECOMPILATION
#================================================= #=================================================
sudo -u $app --login << EOF sudo -u $app /bin/bash << EOF
source /usr/share/yunohost/helpers
ynh_use_nodejs
cd diaspora cd diaspora
RAILS_ENV=production bin/rake assets:precompile 2>&1 RAILS_ENV=production bin/rake assets:precompile 2>&1
EOF EOF

View file

@ -90,10 +90,12 @@ chmod 0750 $final_path -R
chown $app:www-data $final_path chown $app:www-data $final_path
#================================================= #=================================================
# INSTALL RVM AND RUBY FOR CURRENT USER # INSTALL RVM, RUBY AND NODE FOR CURRENT USER
#================================================= #=================================================
ynh_script_progression --message="Installing rvm and ruby... (will take a long time)" --weight=20 ynh_script_progression --message="Installing rvm and ruby... (will take a long time)" --weight=20
source ./install_ruby source ./install_ruby
ynh_script_progression --message="Installing node" --weight=10
ynh_install_nodejs --nodejs_version=14
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -94,6 +94,12 @@ ynh_script_progression --message="Remove ruby (if this is the last app using it)
source $final_path/Experimental_helpers/ynh_install_ruby/ynh_install_ruby source $final_path/Experimental_helpers/ynh_install_ruby/ynh_install_ruby
ynh_remove_ruby ynh_remove_ruby
#=================================================
# REMOVE NODE
#=================================================
ynh_script_progression --message="Remove nodejs for this app"
ynh_remove_nodejs
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================

View file

@ -69,11 +69,12 @@ chmod 0750 $final_path -R
chown $app:www-data $final_path chown $app:www-data $final_path
#================================================= #=================================================
# INSTALL RVM AND RUBY FOR CURRENT USER # INSTALL RVM, RUBY AND NODE FOR CURRENT USER
#================================================= #=================================================
ynh_script_progression --message="Reinstalling rbenv and ruby..." --weight=10 ynh_script_progression --message="Reinstalling rbenv and ruby..." --weight=10
source ./install_ruby source ./install_ruby
ynh_script_progression --message="Reinstalling node" --weight=10
ynh_install_nodejs --nodejs_version=14
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -58,17 +58,25 @@ ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies $ruby_build_dependencies ynh_install_app_dependencies $pkg_dependencies $ruby_build_dependencies
#=================================================
# INSTALL NODE
#=================================================
ynh_script_progression --message="Install node"
ynh_install_nodejs --nodejs_version=14
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
# migrate from rvm to rbenv # migrate from rvm to rbenv
ynh_script_progression --message="Remove rvm..." ynh_script_progression --message="Remove rvm if needed..."
if [ -e "$final_path/.rvm" ]; then if [ -e "$final_path/.rvm" ]; then
sudo -u $app --login << EOF sudo -u $app --login << EOF
rvm implode --force rvm implode --force
EOF EOF
fi fi
ynh_script_progression --message="Install ruby"
source ./install_ruby source ./install_ruby
# remove old gpg keys for rvm # remove old gpg keys for rvm
ynh_script_progression --message="Remove old rvm keys..." ynh_script_progression --message="Remove old rvm keys..."
if gpg --list-keys mpapis@gmail.com >/dev/null 2>&1; then if gpg --list-keys mpapis@gmail.com >/dev/null 2>&1; then