Conversation
|
@onema, At the first glance, it really looks promising! Thanks! Really appreciated :) |
.gitignore
Outdated
There was a problem hiding this comment.
Why are you removing build dir?
There was a problem hiding this comment.
You are right, there is no need to remove the build from.gitignore. Will fix
|
@onema, also thanks for the great description. This is super helpful.
Does this mean we need to clean up the |
There was a problem hiding this comment.
If it is called by the phar file, do we still need to require autoload file? If the phar file includes all the deps, there is no need to require them, right?
Is there a way to detect if it's called from within a phar file? If so, can we skip this section in that case?
There was a problem hiding this comment.
I'll double check this tonight/tomorrow and report back.
There was a problem hiding this comment.
I'm also fine with having a separate files for calling from phar, and calliing from git clone, or composer installation.
There was a problem hiding this comment.
Line 5 is required by the phar. Let me know what you want to do as far as keeping this file as is or just using it for the phar.
There was a problem hiding this comment.
Instead of this You can just use Phar::mapPhar.
|
Please, do not create a phar file if one job passed (eg 5.6) and other failed (eg 5.5). |
|
@keradus Great point and agreed. I'm wondering if there's a clean way of doing that just with .travis.yml. Do you know? |
|
No. Travis is no-good of deploying libraries and tools, as they are supposed to work on multiple envs. Travis is only good for deploying applications, as they are run under one, unified environment (so 1 job in Travis build using Travis in classic way). At least that is how it works few months ago, if it changes and you could run deploy not as job section, but as after-whole-build part, that would be sth I would like to see! |
|
@keradus, @tmatsuo: The build using travis would only run when a tag is created using the selected version of PHP.This would only happen after all the test have been run for all version and have been merged into a common branch (master). In any case, that is just a proposal and is not present in this PR. The phar can still be created using any method you like by doing this: It can latter be attached to the tag release or distribute in any way you like :) |
|
Ah, @onema thanks! So I can run the release script only for push build to master, also only with a one single env. I think we should build the phar with If you don't have an answer for now, nevermind, I'll test that anyways. |
|
I know @onema, but it isn't protect from tag created on code that works on PHP5.6 and didnt work on PHP5.3. @tmatsuo, build it on 5.3.3 with highest deps to ensure it works everywhere. |
@keradus, From now on, we will never merge red builds into master, so it should be fine.
Thanks! As always :) |
This reverts commit 2c66d8e.
|
Just a note, this will fix #92 |
It could happen even by accident. Just having multiple jobs on Travis and deploy by Travis isn't the best option. |
|
LGTM I'm going to merge this. For a time being, I will manually creat the phar. I will revisit automation later. Thanks again! |
There was a problem hiding this comment.
nope, just to prove that merging is too fast ;)
There was a problem hiding this comment.
Well, everything doesn't need to be perfect :) I'll file it then.
Objective:
This PR aims to add the basic files and configuration to create a
coveralls.pharusing thebox-project. The.pharfile can be build by travis and attached to a release when tagged.The
.pharcan be downloaded by third party projects and used instead of requiring it as a dependency.Summary of changes:
bin\coverallsfile.travis.ymlandcompsoer.jsonbox.jsonfile with configuration required to build phar using box-projectBuilding and deployment:
The
coveralls.pharfile can be build and deployed using travis every time a release is tagged by adding the following to the .travis.yml:Notice that composer is run with the flag
--no-devto avoid including anyrequire-devdependencies.See the travis deployment documentation for more information on how to securely add the API key to the deployment section