Giter Club home page Giter Club logo

Comments (16)

mikaelbr avatar mikaelbr commented on July 21, 2024

What kind of settings are you thinking of mainly? Something like:

{
  "commitMessage": "Bumps to version %s",
  "tagName": "v%s-src",
  "noPrefix": true,
  "push": "origin master"
}

(if push is being implemented - ref issue #14)

And then you would just do

$ mversion minor

To bump?

from mversion.

timkelty avatar timkelty commented on July 21, 2024

@mikaelbr exactly!

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

Good idea. This shouldn't alter any of the existing behaviour, though. And if for instance --tag "v%s" is passed, it should take precedence over the rc-file.

from mversion.

timkelty avatar timkelty commented on July 21, 2024

Yep, agreed.

from mversion.

timkelty avatar timkelty commented on July 21, 2024

With a place to set options, I could also see wanting an option for something like commandsAfter, where I might put npm publish. Though that could be a dedicated option as well.

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

This is a very good idea I think. I'm a bit hesitant of adding features willy-nilly, but I think this sounds very useful.

I'm almost done implementing the rc-file now, just adding the final tests - and I'll look into adding scripts afterwords.

What is the best naming, you think?
post_scripts/pre_scripts (or with camelCase)
or commandsAfter/commandsBefore.

Any other?

from mversion.

timkelty avatar timkelty commented on July 21, 2024

I'm ok with either. Just plain old after/before would be ok too, I think.

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

I think the best naming would be preupdate and postupdate to match the naming conventions of https://www.npmjs.org/doc/misc/npm-scripts.html

I initially though of having a set of commands, as in

{
   "postupdate": [ "git push", "npm install" ]
}

But I think this increases the complexity and raises questions of sync or async etc. It's better to have:

{
   "postupdate": "git push && npm install"
}

from mversion.

timkelty avatar timkelty commented on July 21, 2024

Agreed on both accounts.

from mversion.

timkelty avatar timkelty commented on July 21, 2024

Will this just look in the dir where you're executing the commands, or it look all the way up the file system (like most rc files)?

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

My thought was, since mversion requires you to be in the dir where package.json, bower.json or where ever is, it's also natural to think that the .mversionrc file would be there, no?

from mversion.

timkelty avatar timkelty commented on July 21, 2024

Reasonable to assume, I think this is usually just how rc files work.
e.g. .jshintrc: http://www.jshint.com/docs/

This way you could just put your defaults in your home dir if you wanted to.

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

Good thinking. Allowing for more global default settings.

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

Available in version 1.3.0.

from mversion.

timkelty avatar timkelty commented on July 21, 2024

Now that's what I call service!

Now I can ditch these silly grunt-bump dependencies and manage things globally.

Thanks!

from mversion.

mikaelbr avatar mikaelbr commented on July 21, 2024

I use this over gulp-bump myself (obviously maybe?).
No worries, by the way. Very happy to help.

Thanks for a great issue and fantastic responses!

from mversion.

Related Issues (20)

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.