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

Improve bin #97

Merged
merged 6 commits into from
Apr 25, 2024
Merged

Improve bin #97

merged 6 commits into from
Apr 25, 2024

Conversation

szepeviktor
Copy link

I hope there is no need to load 2 autoloaders. The original bin had 2 if-s.

This PR introduces a straight-forward and explicit bin.

@szepeviktor
Copy link
Author

Are tests failing because we actually need 2 autoloaders??

@szepeviktor
Copy link
Author

szepeviktor commented Apr 25, 2024

Are tests failing because we actually need 2 autoloaders??

Could it be that tests are failing a year ago?

@BrianHenryIE
Copy link
Owner

@szepeviktor Thanks, that's much nicer.

Yeah, Windows tests have never passed.

I added some code to run the tests first with the classes, and then as the packaged phar.

- name: Build phar
run:
./scripts/createphar.sh
- name: Run tests with strauss.phar
run: vendor/bin/phpunit

if (file_exists($this->projectDir . '/strauss.phar')) {
exec('php ' . $this->projectDir . '/strauss.phar', $output, $return_var);
return $return_var;
}

@BrianHenryIE BrianHenryIE merged commit a88e1a7 into BrianHenryIE:master Apr 25, 2024
6 of 11 checks passed
@szepeviktor
Copy link
Author

Very glad to contribute.

@szepeviktor szepeviktor deleted the patch-1 branch April 25, 2024 21:47
@BrianHenryIE
Copy link
Owner

Here's why the code was whack before... it was to do with running it from arbitrary directories. E.g. I'm in ~/Sites/my-plugin and run it from ~/Sites/strauss/bin/strauss. I had to reorder the paths. And left some comments.

adff2ea

@szepeviktor
Copy link
Author

All right.
The phar distribution is safer.

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