Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helpers v2.1 : download composer globally in /opt/yunohost/composer #1870

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Salamandar
Copy link
Contributor

@Salamandar Salamandar commented Jun 19, 2024

  • download composer globally in /opt/yunohost/composer
  • replace --full_replace with --no_clean (disappeared?)
  • ynh_in_ci (included in helpers 2.1)
  • ynh_setup_source: change the path to the patches
  • ynh_setup_source: patch failure is now fatal in CI.

@Salamandar Salamandar force-pushed the fpu_helpers branch 5 times, most recently from 37f7d32 to c1bc824 Compare June 19, 2024 13:35
Base automatically changed from helpers-2.1 to dev June 20, 2024 17:07
@alexAubin
Copy link
Member

download composer globally in /opt/yunohost/composer

Why not but maybe let's use /opt/composer to be consistent with nodejs, ruby, go ?

Also I'm a bit perplexed because I do think some app call composer from some intermediate tool such as roundcube ? (https://github.com/YunoHost-Apps/roundcube_ynh/blob/master/scripts/upgrade#L190) soooo @_@

change the path to the patches

+1 but i need to adapt the autopatch script to handle this properly

@Salamandar
Copy link
Contributor Author

Why not but maybe let's use /opt/composer to be consistent with nodejs, ruby, go ?

That would be fine with me.

Also I'm a bit perplexed because I do think some app call composer from some intermediate tool such as roundcube ? (https://github.com/YunoHost-Apps/roundcube_ynh/blob/master/scripts/upgrade#L190) soooo @_@

their update.sh contains this:

function find_composer()
{
    if (is_file(INSTALL_PATH . 'composer.phar')) {
        return 'php composer.phar';
    }

    foreach (['composer', 'composer.phar'] as $check_file) {
        $which = trim(system("which $check_file"));
        if (!empty($which)) {
            return $which;
        }
    }

    return null;
}

So I could change this helper to put composer/composer.phar in the PATH.

@@ -261,16 +261,19 @@ ynh_setup_source() {
fi

# Apply patches
if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(done in dev but this change is on the .v1 helper, not 2.1)

@alexAubin alexAubin changed the title Helpers v2.1 suggestions Helpers v2.1 : download composer globally in /opt/yunohost/composer Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants