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

fix(package): Improve regex for extracting gradle version from gradle.properties #4760

Merged
merged 1 commit into from Dec 27, 2022

Conversation

swpalmer
Copy link
Contributor

Description

Changed regex to (?m)^\s*version\s*=\s*(?P<version>.*) to account for comment lines and possible whitespace.

Motivation and Context

Closes #4759

How Has This Been Tested?

Added test with build.gradle file that contains commented out version= that was picked up by previous regex and with whitespace around the '='

  • [x ] I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@andytom andytom changed the title fix: Improve regex for extracting gradle package version from gradle.properties (#4759) fix(package): Improve regex for extracting gradle version from gradle.properties Dec 26, 2022
@andytom andytom merged commit 9093891 into starship:master Dec 27, 2022
@andytom
Copy link
Member

andytom commented Dec 27, 2022

Thanks for your contribution @swpalmer and thank you for reviewing @davidkna.

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.

Getting a package version from gradle.properties is not implemented correctly
3 participants