Skip to content

Extended semver.sh to also work as a stand alone command + rewritten tests #3

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

StevenLooman
Copy link

Extended semver.sh to also work as a stand alone command. Now one can do:

  $ semver.sh 1.0.0 gt 1.0.1
  1
  $ semver.sh 1.0.0 lt 1.0.1
  0

Also, reimplemented the tests to make it easier to spot errors.

@perplexes
Copy link

This is exactly what I was looking for -- thank you @StevenLooman !!

Note to maintainers: You've got some outstanding pull requests. I recommend pulling this one in, at least.

@Ariel-Rodriguez
Copy link

@perplexes @StevenLooman it fails

FAIL

./semver.sh 1.0.0-rc.1 gt 1.0.0-rc.0
./semver.sh: line 38: [: 1.1: integer expression expected
./semver.sh: line 42: [: 1.1: integer expression expected
./semver.sh: line 47: [: 0.1: integer expression expected
./semver.sh: line 51: [: 0.1: integer expression expected
./semver.sh: line 56: [: 0.1: integer expression expected
./semver.sh: line 60: [: 0.1: integer expression expected
0

tested under OSX

I created a similar tool simplified way that actually works as intended https://gist.github.com./Ariel-Rodriguez/9e3c2163f4644d7a389759b224bfe7f3

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.

3 participants