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

Gets the latest version of Cake from GitHub #56

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ecampidoglio
Copy link
Member

This PR resolves #55 by fetching the version of the latest Cake.Tool release through the GitHub REST API.

@ecampidoglio ecampidoglio self-assigned this Apr 26, 2024
@ecampidoglio ecampidoglio force-pushed the bug/gh-55-get-latest-version-from-github branch from f290aa6 to cb24976 Compare April 26, 2024 08:25
Earlier, not providing an argument for the `cake-version` input
parameter resulted in the Cake.Tool being installed without the
`--version` parameter. This is fine in most cases, since in practice it
translates into installing the latest version.

The case when it stops being fine is when an earlier version of the
Cake.Tool is already installed in the tools directory and you're running
the action without a version number.

In that case, you would expect the action to uninstall the existing
version of the Cake.Tool and install the latest one, but what used to
happen instead is that the action wouldn't even check what version
was installed, since it had no version number to compare with, and it
would just use whatever version of the tool was already installed.

This commit addresses this corner case by explicitly fetching the latest
version of the Cake.Tool from GitHub when no version number is specified
by the user. This way, the action is able to compare that version number
with whatever may already be installed and act appropriately.
@ecampidoglio ecampidoglio force-pushed the bug/gh-55-get-latest-version-from-github branch from cb24976 to 6423e8b Compare April 26, 2024 08:59
@ecampidoglio ecampidoglio force-pushed the bug/gh-55-get-latest-version-from-github branch from 6423e8b to 344b01b Compare April 26, 2024 09:26
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.

The latest Cake version is not always honoured
1 participant