Created
March 9, 2020 02:33
-
-
Save tianhaoz95/b83cffa1e6bb48493d730769a0fab6d5 to your computer and use it in GitHub Desktop.
example of retrieving the version code from metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version = pubspec["version"] | |
| if not version.include? "+" | |
| raise "Verson code indicator (+) not foud in pubspec.yml" | |
| end | |
| version_sections = version.split("+") | |
| version_name = version_sections[0] | |
| version_code = version_sections[1] | |
| return version_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment