-
Notifications
You must be signed in to change notification settings - Fork 281
Build phar using box #548
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
Build phar using box #548
Conversation
I think having build_phar in the bin folder will add it to people's bin dir when they install phpspec via composer, right? |
The box file looks great though - maybe we don't need the script? |
Uses Makefile now. |
Works for me, but when I build, the file is called |
With the .phar not running inside phpspec - would this be fixed with a switch to require_once in bin/phpspec? |
Ignore last comment ;-) If you add a composer install --dev step at the end, it resets the autoloader UID and lets you use the phar locally, to avoid that confusion. Or, is there some way to move vendor to, say, vendor-backup and exclude it from the phar, then move it back in place afterwards? |
I dont think it is a problem, you would never use the phar to run the tests for the library from which is what build. |
That's fair - did you see my comment about the filename? It looks as if some magic is supposed to happen? |
when building the phar it will take a part of the git hash and append to the generated name, in order to avoid overwrites and clashes. |
When I type |
When i run it on OS X i get
|
I installed box fresh via brew to try it out, the version I am running is:
is there some configuration that needs to be enabled to make this work? |
I just installed it via composer global require ~2.4 havent done anything else :) |
Very strange. Maybe you should add that to the require-dev? |
Don't think that is really a device requirement. More a build one. |
Well, if you and I are getting inconsistent behaviour... |
no we don't. Composer symlinks only the files listed in the composer.json |
|
||
build-phar: | ||
@echo "--> Checking for composer command line tool" | ||
command -v $i >/dev/null && continue || { echo "$i command not found."; exit 1; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is $i
here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woups ill fix that.
Ah, thanks @stof |
The only reason I've not merged this is it doesn't work for me :/ |
…ry platform (apparently)
@ciaranmcnulty i opted for the simple solution, dont use magic named phars, just make a phpspec.phar instead. |
I guess we have a question now of where the .phar should go. |
on the releases page |
Oh ok, so github host? Excellent. |
i would gladly make the phars, but someone with powah needs to edit the releases :) (not the tags, just add the file to the github releases tab thingy) |
I made a PHAR for 2.1-RC2, have a look when you are finished with Jeopardy :-) |
@ciaranmcnulty haha looks good :) I sucked at jeopardy! |
Fixes #532
Trying to use the build phar in the phpspec directoy in which it was build will result in an redeclaration error, as it will try and load
vendor/autoload.php
and as the files in the phar and in the project are exactly the same, it will fail. So try it out in another project using phpspec :)