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

Parse version numbers for alpha, beta, rc releases #5

Merged
merged 3 commits into from Jun 20, 2019

Conversation

@mhanberg
Copy link
Contributor

mhanberg commented Jun 13, 2019

The list-all command should print out the correct names of each version, even if that version is an alpha, beta, or rc release.

Current Behavior

$ asdf list-all io
2008.03.30
2010.06.06
2011.09.03
2011.09.05
2011.09.06
2011.09.12
2013.12.04
2015.11.11
2017.09.06
2019.05.22

Expected Behavior

$ bin/list-all
2008.03.30
2010.06.06
2011.09.03
2011.09.05
2011.09.06
2011.09.12
2013.12.04
2015.11.11
2017.09.06
2019.05.22-alpha
bin/list-all Outdated Show resolved Hide resolved
}

function extract_versions_numbers() {
grep -o "name\": \"[0-9]\+.[0-9]\+.[0-9]\+" | sed 's/name": "//'
grep -o "name\": \".*" | sed 's/name": "\(.*\)\",/\1/'

This comment has been minimized.

Copy link
@mracos

mracos Jun 18, 2019

Owner

Right now with this regex we are grepping everything, which could return false positives

Screenshot 2019-06-18 20 03 41

WDYT about just modifying the regex to additionally match the release name if there is any?
I think something like grep -o "name\": \"[0-9]\+.[0-9]\+.[0-9]\+-\?\w\+" would work

Screenshot 2019-06-18 20 01 39

This comment has been minimized.

Copy link
@mhanberg

mhanberg Jun 19, 2019

Author Contributor

I don't think it matters too much, but I think it's a matter of what what tradeoff's you want to take.

I'll make the change.

@mracos

This comment has been minimized.

Copy link
Owner

mracos commented Jun 18, 2019

Thanks for your contribution @mhanberg 💙
Just some comments then we can merge it 😄

mhanberg added 2 commits Jun 19, 2019
This is required by the asdf spec
@mracos mracos merged commit 65d2e99 into mracos:master Jun 20, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.