-
Notifications
You must be signed in to change notification settings - Fork 18
Add support for phar #38
Conversation
### Added - support to build phar using `box-project/box2` - support to provide certificate bundle via temporary file to avoid curl issue when using phar, see (https://bugs.php.net/bug.php?id=69035) for further details - support to create phar during travis build and attach it to release
|
@MaSpeng thanks for your contribution. The pr looks good, just needs some adjustments. You added this installation alternative in the beginning and since this is an alternative and not the recommended way it should be after the current one. The other detail is the deploy. Would it be possible to do it in CircleCI? We do not use travis for our builds. In this case we only have it in this project to have an example. |
Moved description for alternative installation method at the end of the installation description.
|
@rtfpessoa I updated the readme and moved the instruction at the end of the installation description. Regarding the upload of the created phar using CircleCi, as far as i could find out it should be possible. Currently i haven't access to CircleCi as an build environment so i am unable to create an test for the required configuration. You might help me with that? Otherwise i could remove the changes from the travis configuration. |
Revertet changes to travis ci configuration and added required deployment changes to CircleCi configuration.
|
@rtfpessoa I reverted the changes to the travis ci configuration and updated the CircleCi configuration to create an phar on creating an new release/tag. It will create the phar and upload it to the github release archive. If not already done, an environment named I have successfully tested it with an free account from CircleCi. |
|
I just added the key to the CircleCI environment. I will merge this an see if it works. Can you just add a title before the instructions in the readme like: |
Added separate title for alternative installation using phar.
|
@MaSpeng I will have to revert this back. I did not completely understand what this plugin does. We are doing the tags manually and this plugin seems to rely on a tag. I guess we can export the phar in CircleCI, but in GitHub will be harder since there is no good way to manage major, minor, path releases from the build server. |
|
@rtfpessoa The ci configuration will run the deployment commands (creation of the phar and uploading to the github release) only if the build has been triggered by the creation of an tag (manually or automatically is the same) and if the tag follows semver (x.x.x). The plugin will use the github api to attach the provided file to the provided tag during the build. For me i used the provided CircleCi configuration with an fork of this repo. After i created an release/tag on github, CircleCi has run a build. As an result i got a version with the attached phar. See: https://github.com/MaSpeng/php-codacy-coverage/releases/tag/1.4.2. As i understood there should be no problem because the build, creation of the phar and upload will only be executed after a new tag has been created. |
|
Ahhh, that makes a lot of sense. I guess I was confused. I think now it should be running. https://github.com/codacy/php-codacy-coverage/releases/tag/1.4.2 Thanks for your help and patience. |
This patch will add support for creating an phar for each new release.
The intention behind this pull request is to be able to use an phar instead of the composer dependency to fulfill the task of uploading the generated coverage report.
Things that need to be done:
See https://docs.travis-ci.com/user/deployment/releases/ and https://docs.travis-ci.com/user/environment-variables/#Defining-encrypted-variables-in-.travis.yml for further details.
Please let me know if i could provide any further details.