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

Merged
merged 3 commits into from
Aug 28, 2024

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 requested a review from devlead April 26, 2024 08:04
@ecampidoglio ecampidoglio force-pushed the bug/gh-55-get-latest-version-from-github branch 3 times, most recently from 6423e8b to 344b01b Compare April 26, 2024 09:26
Copy link
Member

@devlead devlead left a comment

Choose a reason for hiding this comment

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

LGTM

@ecampidoglio ecampidoglio force-pushed the bug/gh-55-get-latest-version-from-github branch from 344b01b to 6988b16 Compare August 23, 2024 05:54
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 6988b16 to f125c66 Compare August 23, 2024 06:20
@ecampidoglio ecampidoglio merged commit e313098 into master Aug 28, 2024
8 checks passed
@ecampidoglio ecampidoglio deleted the bug/gh-55-get-latest-version-from-github branch August 28, 2024 15:15
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
2 participants