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

Update composer scripts to run only in dev mode #1177

Closed
wants to merge 1 commit into from

Conversation

netpok
Copy link
Contributor

@netpok netpok commented Mar 15, 2021

Summary

This PR updates the suggested composer integration to run only in dev environment. This should do the same as #1067 without introducing a new command.

Also the PR suggest executing the same commands in the post-install section, which can be helpful if repository is access from multiple locations or have different branches with different composer.json

The command:
[ $COMPOSER_DEV_MODE -eq 0 ] || $PHP_BINARY artisan ide-helper:generate: test that composer is not in dev mode or execute ide-helper:generate if it is.

If more readable the following is the same:
test $COMPOSER_DEV_MODE -eq 0 || $PHP_BINARY artisan ide-helper:generate

This should work under Linux, Mac and WSL (Windows).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Misc. change (internal, infrastructure, maintenance, etc.)

Checklist

  • Existing tests have been adapted and/or new tests have been added
  • Add a CHANGELOG.md entry
  • Update the README.md
  • Code style has been fixed via composer fix-style

Copy link
Collaborator

@mfn mfn left a comment

Choose a reason for hiding this comment

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

Will this work on windows? 🤔

@netpok
Copy link
Contributor Author

netpok commented Mar 15, 2021

Turns out no, because windows is crap

@netpok netpok closed this Mar 15, 2021
@mfn
Copy link
Collaborator

mfn commented Mar 15, 2021

😬

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

Successfully merging this pull request may close these issues.

2 participants