Giter Site home page Giter Site logo

marque's Introduction

Marque Marque - Tag Versioning Helper

npm version npm

NPM

This open-source library helps in fetching and versioning the tags of your GIT repositories and Google Cloud Platform images.

It can be used either inside a node repository or as a CLI tool.

Requirements

  • Node 7.0.0 or later
  • Git or gcloud as per the usage

Installation

It can be installed locally or globally or both as per different use cases. Local installation is preferred if this library will be used inside a node module. Global installation is preferred if it will be used as a CLI tool.

For Local Repository

# via npm
npm install marque

# via yarn
yarn add marque

Global Installation

# via npm
npm install -g marque

# via yarn
yarn global add marque

Usage

As per the use case, this library can be used in multiple ways:

Node Module

It can be integrated with any Node.js service. It will return the incremented tag version based on the configuration.

const marque = require('marque');

marque.increment({ type: 'git', version: 'minor' })

Options:

  • type: Usage type i.e. git or gcloud
  • version: Version type to increment i.e. major, minor or patch
  • imageName: Image or resource name on gcloud. (Only for GCP)
  • limit: Number of previous tags to fetch from gcloud to evaluate the latest tag. Normally this won't be required. (Only for GCP)
Config Keys default accepts
type git git or gcloud
version patch major, minor or patch
imageName undefined string
limit 10 number



Command line interface

It can be used in your terminal with interactive CLI just using the command:

marque

It can also be used directly using:

# GIT

marque git <version>

marque <version> # Can omit git as it's default
# Google Cloud Platform

marque gcloud <version> <image-name>

marque gcloud <version> <image-name> --limit=50 # with limit

Tools like Jenkins

newTag=$(marque gcloud <version> <image-name>)

if [[ $newTag == *"Error"* ]]; then
  exit 0
fi

Third-party Resources and Credits

Refer third-party-attributions.txt

Authors

Contributing

Please go through our contributing guidelines

Code of Conduct

Code of Conduct

License

MIT

marque's People

Contributors

dependabot[bot] avatar pntgupta avatar softvar avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.