Socket
Book a DemoInstallSign in
Socket

grunt-project-version-updater

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-project-version-updater

Set git, sonar, npm version from only one place

0.0.3
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Introduction

Update you project version from one place using grunt, frameworks supported

  • git
  • sonar
  • npm

Pre requisites

  • grunt cli

      $ sudo npm install -g grunt-cli
    

How to use

from terminal

grunt update --mg-v 0.0.1

from Gruntfile

projectVersionUpdater: {
	default: {
		options:{
			version: '1.0', // or --mg-v from commandline. The version of the project
			commitVersion: true, // commit on git after update project version, to work git option file have to be on last item of list
			overrideTag: false, // delete git tag if it exists, then create it again for the last commit
			commitMessage: 'setting version' // or --mg-m from commandline. Message to commit if commitVersion is able
		},
		files: {
			sonar: ['sonar-project.properties'], // you need to pass array
			npm: ['.'],
			git: ['.'] // if the property is not passed the framework will no be updated
		}
	}
}
....
		

Testing before install

On this project you can test it running

$ npm install
$ grunt update --mg-v 5.0.0

Running "projectVersionUpdater:default" (projectVersionUpdater) task
5.0.0
>> updating: sonar ...
	sonar-project.properties
>> sonar updated!
>> updating: git ...
	.
>> git updated!
>> updating: npm ...
	package.json
>> npm updated!
>> ... all done!

	

or

grunt update # to update from Gruntfile.js fixed version 


		

Installation

$ npm install grunt-project-version-updater --save-dev

setting on Gruntfile.js

projectVersionUpdater: {
	default: {
		options:{
		},
		files: {
			sonar: ['sonar-project.properties'],
			npm: ['.'],
			git: ['.']
		}
	}
}
...
grunt.registerTask('update', ['projectVersionUpdater']);

Terminal Options

Terminal have preference

--mg-v 
	The version of the project
--mg-m 
	Message to commit if commitVersion is able

Options defaults

options: {
	version: null,
	commitVersion: true,
	overrideTag: false, 
	commitMessage: 'setting version' 
}

Keywords

gruntplugin

FAQs

Package last updated on 28 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.