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

[QUESTION]: how to do composer install and a roll back feature? #47

Closed
itsmenewbie03 opened this issue May 11, 2024 · 4 comments
Closed
Labels
question Further information is requested

Comments

@itsmenewbie03
Copy link

itsmenewbie03 commented May 11, 2024

Description

I have the following questions:

  • How can I do a composer install for cases the latest release requires a new package?
  • How can I implement a roll back feature? (is there an option where I can select which version to update to instead of just automatically updating to the latest?)
@itsmenewbie03 itsmenewbie03 added the bug Something isn't working label May 11, 2024
@salahhusa9
Copy link
Owner

For composer install it's unrecommended to do inside/by package because in case of laravel-updater need also update well be a problem, i recommend running composer install after php artisan updater:update

@salahhusa9
Copy link
Owner

salahhusa9 commented May 11, 2024

For question tow:

  • roll back: (not supported now) this will be probably a problem if you run migration or seeding, its depend on use case
  • update to specific version not latest: (not supported now) this good idea

In general, i will add it

@salahhusa9 salahhusa9 added question Further information is requested and removed bug Something isn't working labels May 11, 2024
@itsmenewbie03
Copy link
Author

For composer install it's unrecommended to do inside/by package because in case of laravel-updater need also update well be a problem, i recommend running composer install after php artisan updater:update

so this means that running composer install inside

    'after_update_pipelines' => [
        // you can add your own pipelines here
    ],

is a bad idea?

@salahhusa9
Copy link
Owner

yes, it's bad idea
you can use this in github action for update automaticity by release

name: deploy to server by ssh

concurrency:
  group: production
  cancel-in-progress: true

on:
  release:
    types: [released]

# on: [push]

jobs:
  deployment:
    runs-on: ubuntu-latest
    environment: production

    steps:
      - name: executing remote ssh commands using password
        uses: appleboy/ssh-action@v1.0.3
        env:
          COMPOSER_ALLOW_SUPERUSER: 1
        with:
          host: ${{ secrets.REMOTE_HOST }}
          username: ${{ secrets.REMOTE_USER }}
          password: ${{ secrets.REMOTE_PASSWORD }}
          port: ${{ secrets.REMOTE_PORT }}
          script: |
            cd ${{ secrets.REMOTE_TARGET }}
            php artisan updater:update
            export COMPOSER_ALLOW_SUPERUSER=1; composer install

as you see i run composer install after update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants