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

Detect Scarb version from .tool-versions file #6

Merged
merged 10 commits into from
Jul 31, 2023
Merged

Conversation

szymmis
Copy link
Contributor

@szymmis szymmis commented Jul 27, 2023

Resolves #1.

The action will now be capable of reading Scarb version from .tool-versions when it is not specified in the workflow file as scarb-version parameter is no longer required.

Steps of determining Scarb version in order of importance:

  1. scarb-version parameter in action yml file
  2. .tool-version file
  3. fetching latest version from GitHub as a fallback

When scarb-version is not specified, action will look for .tool-version file in the root directory of the repository and if it fails to find the file or the scarb entry it will fallback to the latest version of Scarb.

@szymmis szymmis requested a review from mkaput as a code owner July 27, 2023 10:22
lib/versions.js Outdated Show resolved Hide resolved
lib/versions.js Outdated Show resolved Hide resolved
lib/versions.js Outdated Show resolved Hide resolved
lib/versions.js Outdated Show resolved Hide resolved
lib/versions.js Outdated Show resolved Hide resolved
lib/versions.js Show resolved Hide resolved
lib/versions.js Outdated Show resolved Hide resolved
@szymmis szymmis force-pushed the read-tool-versions branch 2 times, most recently from 5739c26 to fb18745 Compare July 27, 2023 13:09
Copy link
Member

@mkaput mkaput left a comment

Choose a reason for hiding this comment

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

Looks good! Please add a test and LGTM 🎉

Copy link
Member

@mkaput mkaput left a comment

Choose a reason for hiding this comment

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

Looks good. Please rebase commits so that they’ll have a linear meaning and I’m happy to accept this :)

@szymmis szymmis added this pull request to the merge queue Jul 31, 2023
Merged via the queue into main with commit 6850f8d Jul 31, 2023
5 checks passed
@szymmis szymmis deleted the read-tool-versions branch July 31, 2023 07:45
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.

Detect Scarb version from .tool-versions file
3 participants