-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Created a release builder workflow #2165
Created a release builder workflow #2165
Conversation
I like this! I'm wondering why though we need to do this:
When Either way, this is really nice! |
This is to maintain compatibility for all the people that are not using composer nor modmad, and generating a zipfile that's exactly how it always was since the beginning of time to now :-) |
I do understand that, what I mean is that the |
sorry 😅 I think it only does it if the "magento-root-dir" is set correctly in the composer.json (although it didn't do it on my local tests) but anyway I preferred to keep the module in the app/code/community directory (as it is now in the repo) |
Ah, that could be it indeed. I'm certainly not opposed to how you have it, I just thought it might be easier to have the I downloaded the build zip file, I'll take a look through it all. |
why is it necessary? Not standing in a way, but I would feel more comfortable when we first have a release where we have the workflow, and only later move dependencies out when we verified the downloads are working properly. |
It's only necessary since the workflow is built to move the libraries downloaded via composer. If those libraries are managed "the old way" there's actually no need for this specific workflow (the way I've done it). |
DISCUSS: imho .... i'd not care about the "old way". Nowadays composer should be available everywhere. Not? However ... nice work, but ...
Maybe something like this ...
|
I see your point and I kinda agree but as far as I understood somebody from our team prefers to maintain as much backward compatibility as possible
Probably because of some php extensions (it's been some months and I don't remember anymore) but at the end of the day it's not necessary that the build environment is actually a "run" environment, I'll check back again when possible.
This was mainly to have exactly the same directory structure we have now on our repo, where we have app/code/community/Cm and, for people that extract the release tgz on an existing docroot, this way the redis module doesn't get duplicated.
I'll try but point 2 is still, I'm not that much opinionated on that, although I prefer when modules install themselves in the "community" scope |
So, I've changed the action to run on php8 instead of the default 7.3, the ignore-platform-reqs is still required (it's used in other actions that we already have in out repo anyway) because otherwise "composer install" will not run without installing gd, sodium and soap, which are not required for building. Problem is, if we build using php8 it will probably use some symfony packages that are not compatible with php7 so I'd like to know what @Flyingmana thinks about that. Either we don't generate any realease (and people will have to run composer install), or should we generate as many releases as php versions? |
we build a release package, which should replace the current .tgz download. the " ignore-platform-reqs" mostly because the used php version or available extensions doesnt matter for during the build. Why do we need to check for PDO for building a .tgz File? In most other github actions it was also, because we wanted to run it in environments, which are not yet officially supported. Or not anymore supported. It makes things easier, and I got not aware of any possible problems. Using a more recent PHP version should be ok. Then its good enough to support the workflow. And if they need it for specific other PHP versions, then they still can pay someone to contribute a build for this one. |
I agree with ignoring PDO ( If we use composer dependencies, that rely on differt php version, we should/can not ignore php version requirements. |
after last modifications, here's the newly generated release: |
Last commit (removing I think dev-tool are only for composer users. |
I didn’t understand, do you think we should include dev files? Cause it’s making the zip 10mb bigger. I think they should be left out. |
I should go to sleep ... thought you removed Nice work 👍 |
@fballiano Should we remove Cm_Redis until symlink error is fixed? |
for me I wouldn't care since (if I understood it correctly) it's a problem only when switching the composer install from dev to no-dev right? so for release preparation and workflow should never be a problem right? |
We have to remove CM-Credis. Please check lib/Credis after composer install (delete vendor before). It is empty or not created. Tested both ... copy and symlink. |
…/openmage into first_release_builder_workflow
@sreichel answered in #2799 (comment) but I think everything works as it is (I'm testing this branch with redis cache now and it's working fine). |
yes! |
Unit Test Results1 files 1 suites 0s ⏱️ Results for commit 10efe8b. |
Since in the future I hope OpenMage moves some of its code (coming from external projects, like
Cm_RedisSession
,Cm_Cache_Backend_Redis
,Pelago_Emogrifier
, ZendFramework
) outside of its repo (for delegation of responsibility and easier upgrades) we need a release builder that pulls this external code using composer and places it in "old style" directories (likelib/Cm
orapp/code/community/Cm/RedisSession
).The release builder workflow that I'm publishing with this PR does exactly that, upon tagging a new release it downloads every composer dependancy, re-creates the oldstyle directories, cleansup, zips and updates the release tag with the newly created file.
You can see the result of a test release on my fork of OM here: https://github.com/fballiano/magento-lts/releases/tag/vprova123.1.6
This PR is strictly dependant on #2138 because they both won't work if they're not both merged.