Code Monkey home page Code Monkey logo

release-version's People

Contributors

mirchow avatar

Stargazers

 avatar

Watchers

 avatar  avatar

release-version's Issues

feature request: support -release syntax

I am using semver-utils in my project and it parses the release name from the semver using -[release] before +[build] which is apparently how the semver spec calls for providing meta information in the version string. See spec item #9 and spec item #10

For example: to have version 2.1.0 have release name "alpha" and build "1337" you would do release-version -b 1337 -r alpha -pre 'build' which would produce 2.1.0-alpha+build.1337. the semver-utils parse() method when ran against 2.1.0-alpha+build.1337 would produce

{
semver: '2.1.0-alpha+build.1337'
, version: '2.1.0'
, major: '2'
, minor: '1'
, patch: '0'
, release: 'alpha'
, build: 'build.1337'
}

so essentially, just asking for -r [release name] option

Feature request: remove '.' if passing empty 'pre' prefix

In my app, I want the build number in the semver format to be just a simple integer, because its being parsed and written as version codes in cordova.

I would love to use your package for managing the build number on TeamCity, however, its forcing me to prefix the build with a '.' character. I am suggesting that if you specify --pre '' (empty string) that it would not add the . separator.

For example:
package.json has 2.1.5, if i run release-version -b 100 --pre '' I would like to get 2.1.5-100

If passing an empty value to --pre is not favorable, then we could instead do something like --no-prefix as a flag that will not prefix the build number at all.

Let me know what you think, I dont mind submitting a PR as well if its something you want to support.

Now that we're using r for release and b for build meta data....

It seems like the pre/prefix option should be to prefix the pre-release version.

For example, you initially wrote this script so that -b 2 --pre rc would produce x.x.x-rc.2, and now we made it so -r is the option for pre-release version and -b is left for build metadata. The --pre option is still modifying the build meta data, when I think you want it to be for the pre-release version name.

This would mean you would do -r 2 --pre rc to produce x.x.x-rc.2, and additionally, passing -b option would add build meta data as per spec item 10, so that would add +(build) after the -rc.2.

Let me know if you are ok with this and I can submit another PR.

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.