@webpack-contrib/tag-versions

1.1.0 • Public • Published

npm node deps tests chat

tag-versions

A command line tool, installed globally on build that wrapps omichelsen/compare-versions for use in our CircleCI 2.0 build containers.

Requirements

This module requires a minimum of Node v6.9.0.

Getting Started

To begin, you'll need to install tag-versions:

$ npm i -g @webpack-contrib/tag-versions --save-dev

Wraps compare-versions to perform semver comparisons on libraries dist-tags consumable from a simple bash script( see below ).

CLI

$ compver --name webpack --gte next --lt latest

  Options
    --name            The name of the pacakge to compare.
    --gte             The dist-tag used in the left side of the comparison.
    --lt              The dist-tag used in the right side of the comparison.

  Intended usage
    $ if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then echo n00p; else npm run test ; fi
  
  Examples
    $ compver --name superLib --gte '10.1.8' --lt '10.0.4' // outputs 1
    $ compver --name superLib --gte '10.0.8' --lt '10.0.8' // outputs 0
    $ compver --name superLib --gte '10.1.1' --lt '10.2.2' // outputs -1

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @webpack-contrib/tag-versions

Weekly Downloads

1

Version

1.1.0

License

Apache-2.0

Unpacked Size

6.75 kB

Total Files

6

Last publish

Collaborators

  • evilebottnawi
  • sokra
  • jhnns