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

Semver comparison hints #355

Closed
vromero opened this issue May 14, 2018 · 8 comments
Closed

Semver comparison hints #355

vromero opened this issue May 14, 2018 · 8 comments
Labels

Comments

@vromero
Copy link

@vromero vromero commented May 14, 2018

Hi all,

Thanks for this great piece of OSS.

I was wondering if there is a recommended way to bifurcate with the gotpl based semver versions.

I'm using dgoss to test a dockerimage with multiple versionso of the contained software and some tests apply to versions prior to X, and other to verions after Y or both.

I can probably do it with some simple regexes but I was hoping there was something better integrated.

@aelsabbahy

This comment has been minimized.

Copy link
Owner

@aelsabbahy aelsabbahy commented May 14, 2018

Currently, regex is the only solution. I want to add semver support, but it's hard to find a standard that works across all package managers.

If you have some library (preferably Go) or OSS software that you feel handle this problem in a generic cross platform way let me know and I'll dig into it.

@vromero

This comment has been minimized.

Copy link
Author

@vromero vromero commented May 14, 2018

I see, thanks for the quick response.

@aelsabbahy

This comment has been minimized.

Copy link
Owner

@aelsabbahy aelsabbahy commented May 28, 2018

Adding support for this library could be neat: https://github.com/blang/semver#ranges

It wouldn't work for all package managers, but would work with anything compliant with the semver spec.

@vromero

This comment has been minimized.

Copy link
Author

@vromero vromero commented May 28, 2018

Agree, if it is not semver then whoever did choose that version scheme didn't mean it to be comparable.

@pedroMMM

This comment has been minimized.

Copy link
Contributor

@pedroMMM pedroMMM commented Nov 27, 2019

@aelsabbahy I was playing with this on my repo and I had success by using https://github.com/hashicorp/go-version and creating another set of advanced mather. What I have already kind of works for me (it needs a better messaging). Would you like me to clean it up and create a PR?

@aelsabbahy

This comment has been minimized.

Copy link
Owner

@aelsabbahy aelsabbahy commented Nov 27, 2019

I would be interested in a semver matcher. I would prefer it be created as a gomega custom matcher that uses go-version.

pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 2, 2019
Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 8, 2019
Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 8, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 8, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 9, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 10, 2019
Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 10, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 10, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 16, 2019
Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 16, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 16, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 17, 2019
Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 17, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 17, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 17, 2019
Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 17, 2019
pedroMMM added a commit to pedroMMM/goss that referenced this issue Dec 17, 2019
aelsabbahy added a commit that referenced this issue Dec 18, 2019
* [#355] Add Custom Version Matcher 

Add Custom Version Matcher 
Add Unit Tests
Add Integration Tests
Update Documentation

* [#355] Pivot to pure semver Matcher

* [#355] Add negation Integration Test as per PR feedback
@pedroMMM

This comment has been minimized.

Copy link
Contributor

@pedroMMM pedroMMM commented Dec 18, 2019

@aelsabbahy This can be closed now. Also I will not mention the issue on commits anymore, that got messy fast :(

@aelsabbahy

This comment has been minimized.

Copy link
Owner

@aelsabbahy aelsabbahy commented Dec 18, 2019

Yeah works better in pr message.

Also, you don't have to rebase/push if there are no conflicts most of the time. Sometimes test count gets out of wack.

@aelsabbahy aelsabbahy closed this Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.