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

Add parsing Swift version from file #665

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

wojexe
Copy link

@wojexe wojexe commented Mar 4, 2024

This PR closes issues #633 and #50

✏️ Changes

  • Breaking | Remove the default Swift version and make it optional (swift-version)
  • Read Swift version from a file specified in the action's configuration (swift-version-file)

📝 TODO

  • Add tests

readFile(filePath, "utf8", (err, data) => {
if (err != null) throw err;

const parsedVersion = data.match(semverRegex)?.at(1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a semver package that's already used in the project that you can use to validate the string 🙂

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