Git Product home page Git Product logo

git-bump-cli's Introduction

git-bump-cli

npm Travis npm

Bump latest git tag following semver and nothing more.

Installation

npm i -g @gableroux/git-bump

Usage

git bump
        _ _     _
   __ _(_) |_  | |__  _   _ _ __ ___  _ __
  / _` | | __| | '_ \| | | | '_ ` _ \| '_ \
 | (_| | | |_  | |_) | |_| | | | | | | |_) |
  \__, |_|\__| |_.__/ \__,_|_| |_| |_| .__/
  |___/                              |_|
? Select what you desire (Use arrow keys)
โฏ patch
  minor
  major
  prepatch
  preminor
  premajor
  prerelease
Successfully fetched tags
Latest tag: v1.0.0
next tag: v1.0.1
Successfully added tag v1.0.1

What this is not

This command line does not aim to replace nice tools such as sindresorhus/np (which I totally recommend if you're using node). @gableroux/git-bump won't update package.json for you, nor publish to npm or whatever package manager you're using. It is only aimed to bump latest git tag locally. ๐Ÿ‘

How to publish

npm i -g np
np

Nope, I'm not eating own dog food here. This project is only intended to interact with git command line.

License

MIT ยฉ Gabriel Le Breton

git-bump-cli's People

Contributors

dependabot[bot] avatar gableroux avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

git-bump-cli's Issues

Add command line arguments using commander

What I'd like to have:

git bump patch

This will bump the patch value of your latest git tag.
Ex: v1.0.0 -> v1.0.1

git bump minor

This will bump the minor value of your latest git tag.
Ex: v1.0.0 -> v1.1.0

git bump major

This will bump the major value of your latest git tag.
Ex: v1.0.0 -> v2.0.0

UnhandledPromiseRejectionWarning: Unhandled promise rejection

? Select what you desire patch
(node:54883) UnhandledPromiseRejectionWarning: Error: From gitlab.com/<snip>
 ! [rejected]        v1.0.0     -> v1.0.0  (would clobber existing tag)

    at Object.action (/Users/gableroux/.npm-packages/lib/node_modules/@gableroux/git-bump/node_modules/simple-git/src/lib/plugins/error-detection.plugin.js:30:33)
    at PluginStore.exec (/Users/gableroux/.npm-packages/lib/node_modules/@gableroux/git-bump/node_modules/simple-git/src/lib/plugins/plugin-store.js:21:33)
    at /Users/gableroux/.npm-packages/lib/node_modules/@gableroux/git-bump/node_modules/simple-git/src/lib/runners/git-executor-chain.js:95:45
    at new Promise (<anonymous>)
    at GitExecutorChain.handleTaskData (/Users/gableroux/.npm-packages/lib/node_modules/@gableroux/git-bump/node_modules/simple-git/src/lib/runners/git-executor-chain.js:93:16)
    at GitExecutorChain.<anonymous> (/Users/gableroux/.npm-packages/lib/node_modules/@gableroux/git-bump/node_modules/simple-git/src/lib/runners/git-executor-chain.js:77:46)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/gableroux/.npm-packages/lib/node_modules/@gableroux/git-bump/node_modules/simple-git/src/lib/runners/git-executor-chain.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:54883) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:54883) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
node --version
v14.19.2

improve documentation

example:

This command line does not aim to replace np or any other amazing command lines out there. It won't update package.json for you, nor publish to npm or whatever package manager you're using. It is only aimed to bump git tags.

I might simply add exactly this to the readme ๐Ÿ˜‚

install globally locally

  1. Clone repo, then run the following commands inside repo
npm i
npm i -g
  1. Run the following command
git bump

Expected result:

the command should succeed

Current result:

/usr/local/bin/git-bump: line 1: syntax error near unexpected token `('
/usr/local/bin/git-bump: line 1: `const chalk = require('chalk');'

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.