New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bump-tag

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bump-tag - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

15

cli.js

@@ -16,5 +16,7 @@ #!/usr/bin/env node

console.log('Custom options:');
console.log(' $ bump -t=major -i=4');
console.log(' $ bump -t=major -i=4 -g=0');
console.log(' $ bump --type=major --indentation=4');
console.log(' $ bump --type=minor --indentation=tab');
console.log(' $ bump --type=minor --git=0');
console.log(' $ bump --type=minor --git=0');
}

@@ -27,2 +29,3 @@

var type = 'patch';
var git = 1;

@@ -34,2 +37,5 @@ process.argv.forEach(function (val) {

}
if(item[0] === '-g' || item[0] === '--git') {
git = Number(item[1]);
}
if(item[0] === '-i' || item[0] === '--indentation') {

@@ -47,3 +53,8 @@ if(!isNaN(Number(item[1]))){

pkg.version = semver.inc(pkg.version, type);
exec("git tag " + pkg.version, puts);
if(git){
exec('git tag ' + pkg.version, puts);
exec('git add package.json', puts);
exec('git commit -m "bump to "'+ pkg.version, puts);
exec('git push origin master', puts);
}
fs.writeFileSync(process.cwd() + '/package.json', JSON.stringify(pkg, null, indentation));

@@ -50,0 +61,0 @@ } catch(e) {

4

package.json
{
"name": "bump-tag",
"version": "0.0.1",
"version": "0.0.2",
"description": "Bump version and add tag",

@@ -37,2 +37,2 @@ "keywords": [

"readmeFilename": "Readme.md"
}
}

@@ -5,2 +5,4 @@ # bump-tag [![Build Status](https://travis-ci.org/danielhusar/bump-tag.svg)](https://travis-ci.org/danielhusar/bump-tag)

I have created this cli mainly because I keep forgetting to add tag when I bump the version.
## Install

@@ -35,3 +37,3 @@

Major, Minor or Patch.
Check (node-semver)[https://github.com/isaacs/node-semver#functions] inc release parameter.
Check [node-semver](https://github.com/isaacs/node-semver#functions) inc release parameter.

@@ -38,0 +40,0 @@ #### indentation

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc