GithubHelp home page GithubHelp logo

yrtimid / azure-pipelines-semver-bump Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 103 KB

Semantic version bump task for Azure DevOps Pipelines

Home Page: https://marketplace.visualstudio.com/items?itemName=yrtimid.semver-bump-task

License: MIT License

TypeScript 100.00%
azure-devops semver task azure-pipelines tfs vsts vsts-task vsts-tasks

azure-pipelines-semver-bump's Introduction

Semantic Version Bump

Azure DevOps Pipelines task for Builds and Releases

Bumps (increments) version saved in an environment variable.

Wraps well known node-semver library inc() function.

Usage

  • Define and populate variable which will hold a version
  • Add a task to your pipeline
  • Put the name of your version variable into "Version variable name" field
  • Select desired "Increment level"
  • Optionally: change "pre id" prefix

Version value is read from the configured environment variable, incremented accordingly and written back to the same variable.

โ— Important to understand: Azure DevOps Pipelines environment variables exists only during pipeline run and destroyed when finished. There is no way of persisting variable value between runs.

To continuosly increment the version its value should be persisted anywhere after increment and reloaded on next run.
Some possible technics (for example, out of scope of this task):

  • Commit as file directly to version control
  • Save as artifact and get value from "last successful build"
  • Discover last version from artifactory

Configuration

azure-pipelines-semver-bump's People

Contributors

yrtimid avatar

Watchers

 avatar  avatar  avatar

azure-pipelines-semver-bump's Issues

Great Tool

Hi @yrtimiD

Great tool, however we're trying to get this working but it keeps complaining about:

##[error]Can't increment version: Error: Variable "1" doesn't contains anything. Valid version string was expected.

how do I get this to increment the MajorVersion?
what is needed to put into the Version variable name?

below is my current pipeline setup:

build pipline:

image

variables:

image

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.