From f8fb3b5a3fe78779338a85d2c515671cf7094e64 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 13 May 2021 21:33:23 +0200 Subject: [PATCH] Removing composer --- README.md | 2 +- README_fr.md | 2 +- check_process | 4 +++ conf/civicrm-drupal.src | 4 +-- conf/civicrm-l10n.src | 4 +-- manifest.json | 4 +-- scripts/install | 9 +++--- scripts/upgrade | 8 +++--- scripts/ynh_composer__3 | 61 ----------------------------------------- 9 files changed, 20 insertions(+), 78 deletions(-) delete mode 100644 scripts/ynh_composer__3 diff --git a/README.md b/README.md index 3d8d8be..12f66fc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview Open source constituent relationship management (CRM) for non-profits, NGOs and advocacy organizations. -**Shipped version:** 5.34.0 on Drupal 7 +**Shipped version:** 5.37.2 on Drupal 7 ## Screenshots diff --git a/README_fr.md b/README_fr.md index e40054a..4cd7794 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Vue d'ensemble Gestion des relations avec les constituants (GRC/CRM) pour les organisations à but non lucratif, les ONG et les organisations de défense des droits. -**Version incluse:** 5.34.0 et Drupal 7 +**Version incluse:** 5.37.2 et Drupal 7 ## Captures d'écran diff --git a/check_process b/check_process index ac4c2b5..30b2466 100644 --- a/check_process +++ b/check_process @@ -21,6 +21,8 @@ upgrade=1 from_commit=a9d902b58a2114d6983fe84c3c0d3f6371335287 # 5.34.0-7.0~ynh1 upgrade=1 from_commit=df23950de037d65d55c4d3d8fef7eb651c02b7ba + # 5.34.0-7.0~ynh2 + upgrade=1 from_commit=836c3bf7101301340fa197851994ba898eafd293 backup_restore=1 multi_instance=1 port_already_use=0 @@ -35,3 +37,5 @@ Notification=all name=5.30.1-7.0~ynh1 ; commit=df23950de037d65d55c4d3d8fef7eb651c02b7ba name=5.34.0-7.0~ynh1 + ; commit=836c3bf7101301340fa197851994ba898eafd293 + name=5.34.0-7.0~ynh2 diff --git a/conf/civicrm-drupal.src b/conf/civicrm-drupal.src index 81725ce..abd3414 100644 --- a/conf/civicrm-drupal.src +++ b/conf/civicrm-drupal.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.34.0/civicrm-5.34.0-drupal.tar.gz -SOURCE_SUM=af11218f346a7b8fd54ef8d6a51b4080f0370137187c12501f52e4368924850b +SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.37.2/civicrm-5.37.2-drupal.tar.gz +SOURCE_SUM=aaf6bdc63aac4267cbae12d20aea575ecf7eb0776f83bf1015006c0c3e50e9d4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/civicrm-l10n.src b/conf/civicrm-l10n.src index 3915998..5d5ae6f 100644 --- a/conf/civicrm-l10n.src +++ b/conf/civicrm-l10n.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.34.0/civicrm-5.34.0-l10n.tar.gz -SOURCE_SUM=cf76310e22f715ff10ad891c35f9cbcef175a92eacf39581aa394b388eb39e75 +SOURCE_URL=https://storage.googleapis.com/civicrm/civicrm-stable/5.37.2/civicrm-5.37.2-l10n.tar.gz +SOURCE_SUM=70f623f066c23cce5ebe0756227559b1ccd127b9c0f3e41e95f94cc9a51d3e4d SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index a0e6884..2274b2c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,14 +6,14 @@ "en": "CRM for non-profits, NGOs and advocacy organizations.", "fr": "CRM pour organisations à but non lucratif et ONG." }, - "version": "5.34.0-7.0~ynh2", + "version": "5.37.2-7.0~ynh2", "url": "https://civicrm.org", "license": "AGPL-3.0-or-later", "maintainer": { "name": "yalh76" }, "requirements": { - "yunohost": ">= 4.1.7.3" + "yunohost": ">= 4.2.0" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index ecf5b9d..cd4992d 100644 --- a/scripts/install +++ b/scripts/install @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_composer__3 source /usr/share/yunohost/helpers #================================================= @@ -90,7 +89,10 @@ ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name ynh_script_progression --message="Creating final path..." ynh_app_setting_set --app=$app --key=final_path --value=$final_path -mkdir -p "$final_path/$app" +mkdir -p "$final_path/$app/sites/all/modules/civicrm" + +ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-drupal" +ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-l10n" chmod 750 "$final_path" chmod -R o-rwx "$final_path" @@ -174,9 +176,6 @@ pushd "$final_path" ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app pm-update ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app core-cron - ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-drupal" - ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-l10n" - touch "$final_path/$app/sites/default/civicrm.settings.php" chmod 750 "$final_path" diff --git a/scripts/upgrade b/scripts/upgrade index 64a6a6e..37879b2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -7,7 +7,6 @@ #================================================= source _common.sh -source ynh_composer__3 source /usr/share/yunohost/helpers #================================================= @@ -74,7 +73,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then - mkdir -p "$final_path/$app" + ynh_secure_remove --file="$final_path/$app/sites/all/modules/civicrm" + mkdir -p "$final_path/$app/sites/all/modules/civicrm" + ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-drupal" + ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-l10n" fi chmod 750 "$final_path" @@ -154,8 +156,6 @@ pushd "$final_path" ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update-refresh ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app l10n-update - ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-drupal" - ynh_setup_source --dest_dir="$final_path/$app/sites/all/modules/civicrm" --source_id="civicrm-l10n" ynh_exec_warn_less sudo -u $app env PATH=$PATH drush --include="$final_path/$app/sites/all/modules/civicrm/drupal/drush" @$app -y civicrm-upgrade-db ynh_exec_warn_less sudo -u $app env PATH=$PATH drush @$app variable-set --exact maintenance_mode 0 diff --git a/scripts/ynh_composer__3 b/scripts/ynh_composer__3 deleted file mode 100644 index ca68a65..0000000 --- a/scripts/ynh_composer__3 +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -readonly YNH_DEFAULT_COMPOSER_VERSION=1.10.17 -# Declare the actual composer version to use. -# A packager willing to use another version of composer can override the variable into its _common.sh. -YNH_COMPOSER_VERSION=${YNH_COMPOSER_VERSION:-$YNH_DEFAULT_COMPOSER_VERSION} - -# Execute a command with Composer -# -# usage: ynh_composer_exec [--phpversion=phpversion] [--workdir=$final_path] --commands="commands" -# | arg: -v, --phpversion - PHP version to use with composer -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -c, --commands - Commands to execute. -ynh_composer_exec () { - # Declare an array to define the options of this helper. - local legacy_args=vwc - declare -Ar args_array=( [v]=phpversion= [w]=workdir= [c]=commands= ) - local phpversion - local workdir - local commands - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - phpversion="${phpversion:-$YNH_PHP_VERSION}" - - COMPOSER_HOME="$workdir/.composer" \ - php${phpversion} "$workdir/composer.phar" $commands \ - -d "$workdir" --quiet --no-interaction -} - -# Install and initialize Composer in the given directory -# -# usage: ynh_install_composer [--phpversion=phpversion] [--workdir=$final_path] [--install_args="--optimize-autoloader"] [--composerversion=composerversion] -# | arg: -v, --phpversion - PHP version to use with composer -# | arg: -w, --workdir - The directory from where the command will be executed. Default $final_path. -# | arg: -a, --install_args - Additional arguments provided to the composer install. Argument --no-dev already include -# | arg: -c, --composerversion - Composer version to install -ynh_install_composer () { - # Declare an array to define the options of this helper. - local legacy_args=vwa - declare -Ar args_array=( [v]=phpversion= [w]=workdir= [a]=install_args= [c]=composerversion=) - local phpversion - local workdir - local install_args - local composerversion - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - workdir="${workdir:-$final_path}" - phpversion="${phpversion:-$YNH_PHP_VERSION}" - install_args="${install_args:-}" - composerversion="${composerversion:-$YNH_COMPOSER_VERSION}" - - curl -sS https://getcomposer.org/installer \ - | COMPOSER_HOME="$workdir/.composer" \ - php${phpversion} -- --quiet --install-dir="$workdir" --version=$composerversion \ - || ynh_die "Unable to install Composer." - - # update dependencies to create composer.lock - ynh_composer_exec --phpversion="${phpversion}" --workdir="$workdir" --commands="install --no-dev $install_args" \ - || ynh_die "Unable to update core dependencies with Composer." -}