{"id":20214161,"url":"https://github.com/masterminds/vert","last_synced_at":"2025-04-10T14:08:21.789Z","repository":{"id":41215795,"uuid":"48858287","full_name":"Masterminds/vert","owner":"Masterminds","description":"Command line version testing: Compare versions at the CLI for use in shell scripts and make files.","archived":false,"fork":false,"pushed_at":"2019-08-30T19:41:18.000Z","size":19,"stargazers_count":59,"open_issues_count":5,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T12:48:03.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Masterminds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-31T18:12:31.000Z","updated_at":"2023-08-08T09:00:03.000Z","dependencies_parsed_at":"2022-09-12T17:41:37.195Z","dependency_job_id":null,"html_url":"https://github.com/Masterminds/vert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fvert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fvert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fvert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Masterminds%2Fvert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Masterminds","download_url":"https://codeload.github.com/Masterminds/vert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248232186,"owners_count":21069477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T06:14:21.627Z","updated_at":"2025-04-10T14:08:21.761Z","avatar_url":"https://github.com/Masterminds.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vert: A command-line version comparison tool\n[![Stability: Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html)\n[![Build Status](https://travis-ci.org/Masterminds/vert.svg?branch=master)](https://travis-ci.org/Masterminds/vert)\n\n\nvert (Version Tester) is a simple command line tool for comparing two or\nmore versions, or testing versions against fuzzy version rules.\n\n## Basic Usage\n\nVert takes at least two arguments: A base version, and one or more\nversions to compare to the base. The base version is special, in that it\ncan be a fuzzy version specification rather than an exact version.\n\n```\n$ vert 1.0.0 1.0.0\n1.0.0\n$ echo $?\n0\n```\n\nWhen `vert` runs, it will print a normalized string of any version that\nmatches, and then will set the exit code to the number of version match\nfailures that it saw.\n\n`vert` understands SemVer v2 versions, so the following will also pass:\n\n```\n$ vert v1.0.0 1\n1.0.0\n$ echo $?\n0\n```\n\nThere are three things to note:\n\n- A leading `v` is ignored.\n- Numbers are expanded to a full SemVer string, thus `1` is expanded to\n  `1.0.0` and `1.1` is expaneded to `1.1.0`\n- The output is normalized to the form `X.Y.Z[-PRERELEASE][+BUILD]`\n\nA failed comparison looks like this:\n\n```\n$ vert 1.0.0 1.2.0\n$ echo $?\n1\n```\n\nFailed version comparisons to not print any text unless the given base\nversion is malformed:\n\n```\n$ vert 1.zoo.cheese 1.1.1\nCould not parse constraint 1.zoo.cheese\n```\n\nBase versions can be fuzzy:\n\n- `vert \"\u003e1.0\" 1.1`\n- `vert \"^2\" 2.1.3`\n- `vert \"\u003e1.1.2,\u003c1.3.4\" 1.2`\n\nAnd `vert` understands alpha/beta markers:\n\n```\nvert \"\u003e1.0.0-alpha.1\" 1.0.0-beta.1\n1.0.0-beta.1\n```\n\nMultiple versions can be compared at once, and using the `-s` flag, you\ncan even sort the output:\n\n```\n$ vert ^1 1.1.1 1.0.1 1.2.3 1.0.2 0.9 2.0\n1.1.1\n1.0.1\n1.2.3\n1.0.2\n$ echo $?\n2\n```\n\nIn the above, we asked vert for all of the version in the `1.X.Y` range\n(`^1`), and then gave it a list of versions, including some outside of\nthat range.\n\n`vert` returned a list of versions that match. Via the return code, we\ncan see that two failed to match. To see which failed, we can use the\n`-f` flag:\n\n```\n$ vert -f ^1 1.1.1 1.0.1 1.2.3 1.0.2 0.9 2.0\n0.9.0\n2.0.0\n```\n\nWe can sort output using the `-s` flag:\n\n```\nvert -s ^1 1.1.1 1.0.1 1.2.3 1.0.2 0.9 2.0\n1.0.1\n1.0.2\n1.1.1\n1.2.3\n```\n\nFinally, `vert` can transform `git describe` versions into SemVer,\nassuming the Git tags are SemVer:\n\n```\n$ vert -g ^1 $(git describe --tags)\n1.0.1+32.fef45\n```\n\nIn the future, we'd like to add more transformations. If you have any\nideas, please let us know in the issue queue.\n\n## Installation\n\nAssuming you have make, [Go](http://golang.org) version 1.5.1 or later and\n[dep](https://github.com/golang/dep), you can simply run `make`:\n\n```\n$ make all\ndep ensure\ndep status\nPROJECT                        CONSTRAINT  VERSION  REVISION  LATEST   PKGS USED\ngithub.com/Masterminds/semver  ^1.0.0      v1.4.0   15d8430   15d8430  1\ngithub.com/urfave/cli          ^1.0.0      v1.20.0  cfb3883   cfb3883  1\ngo test .\nok  \tgithub.com/Masterminds/vert\t0.006s\ngo build -o vert vert.go\ninstall -d /usr/local/bin/\ninstall -m 755 ./vert /usr/local/bin/vert\n```\n\nThis will install into `/usr/local/bin/vert`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterminds%2Fvert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterminds%2Fvert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterminds%2Fvert/lists"}