SymfonyCasts / tailwind-bundle

Delightful Tailwind Support for Symfony + AssetMapper
https://symfony.com/bundles/TailwindBundle/current/index.html
MIT License
84 stars 20 forks source link

Download latest release from github #34

Closed fracsi closed 11 months ago

fracsi commented 12 months ago

Get latest version name from github.

fracsi commented 11 months ago

@bocharsky-bw I think if you need a different version, there is the option to use a custom binary.

My original thought about this PR was to eliminate the need for a PR every time tailwind releases a new version - see #16 or df70d0d1dd15a61636a479722e25fef2a4c8fe87

bocharsky-bw commented 11 months ago

hm, custom binary may be a good workaround if you need to rollback, though a bit more work on it than just specifying a version you want in the config. I wonder what @weaverryan thinks about it and if that https://github.com/SymfonyCasts/sass-bundle/issues/3 could be closed with this PR.

fracsi commented 11 months ago

@bocharsky-bw @weaverryan How about the following: There can be a config option for version (null by default) If null - we try to download the latest version If configured - we try to download the given version

This way there will be no constant default version and fallback.

I have created a seperate PR for this: #37

fracsi commented 11 months ago

Yes., exactly what we had in mind! And that would be very user-friendly :) Let's do it, I will check your a bit PR later, thanks for create a new PR BTW... but this one is ready to be merged I think, thanks!

If this gets merged, than i can work on the other one to contain only the changes for the version config.

bocharsky-bw commented 11 months ago

Hey @fracsi !

I just came up with a possible problem with this solution. Let me explain: when you first install and use this bundle - it will download the latest Tailwind at the current moment... but later when a new version of Tailwind is released - this bundle will still use the downloaded version (which is not latest anymore). I think, to overcome this, we should include the version number in the binary path, right? something like /path/to/tailwind/binary/3.3.6/... - this way when we will have a new Tailwind release - it will be downloaded in the new directory

fracsi commented 11 months ago

@bocharsky-bw This can work only if we leave the version to default to latest. I can give it a go, if you want. Maybe creating a version dir can be enough to solve this.

bocharsky-bw commented 11 months ago

Maybe creating a version dir can be enough to solve this

I think so. Yes, feel free to start when you can :)

fracsi commented 11 months ago

I think so. Yes, feel free to start when you can :)

@bocharsky-bw See #38