Skip to content
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

Download latest release from github #34

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

fracsi
Copy link
Contributor

@fracsi fracsi commented Dec 8, 2023

Get latest version name from github.

Copy link
Member

@bocharsky-bw bocharsky-bw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool! Just a little comment.

It might be a good idea to allow people to choose the version they want to use in their projects, i.e. for some reason you may want to use a legacy version, so it would be awesome to allow it from the config, and we even have an issue related to it: SymfonyCasts/sass-bundle#3

Though, that's an edge case and I'm fine to merge this PR and do that in a different one. Do you want to work on this feature too?

src/TailwindBinary.php Outdated Show resolved Hide resolved
@fracsi
Copy link
Contributor Author

fracsi commented Dec 14, 2023

@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 df70d0d

@bocharsky-bw
Copy link
Member

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 SymfonyCasts/sass-bundle#3 could be closed with this PR.

@fracsi
Copy link
Contributor Author

fracsi commented Dec 15, 2023

@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

Copy link
Member

@bocharsky-bw bocharsky-bw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

@fracsi
Copy link
Contributor Author

fracsi commented Dec 15, 2023

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 bocharsky-bw merged commit 3013811 into SymfonyCasts:main Dec 15, 2023
11 checks passed
@bocharsky-bw
Copy link
Member

bocharsky-bw commented Dec 15, 2023

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
Copy link
Contributor Author

fracsi commented Dec 15, 2023

@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
Copy link
Member

Maybe creating a version dir can be enough to solve this

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

@fracsi
Copy link
Contributor Author

fracsi commented Dec 15, 2023

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

@bocharsky-bw See #38

@fracsi fracsi deleted the latest-release-download branch December 18, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants