Socket
Book a DemoInstallSign in
Socket

grunt-git-remote-tag

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-git-remote-tag

Creates a tag in the provided repository folder and push it to an specific remote.

0.0.4
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

grunt-git-remote-tag

Creates a tag in the provided repository folder and push it to an specific remote.

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide.

From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:

npm install grunt-git-remote-tag

Once that's done, add this line to your project's Gruntfile:

grunt.loadNpmTasks('grunt-git-remote-tag');

Overview

Inside your Gruntfile.js file add a section named gitRemoteTag. This section specifies the tag's name a message an the remote where to push the tag. You must also provide a src indicating the location of your local git repository.

Config Example

Example to tag a new successful version based on the latest build number and environment:

gitRemoteTag: {
    release: {
        options: {
            tag: util.format('v.%s-%s', process.env.BUILD_NUMBER, process.env.ENVIRONMENT),
            remote: 'origin' // optional: default value is 'origin',
            message: 'It worked!', // optional: if not provided it will use the tag as the message,
            force: true|false // optional: default value is false
        },
        src: './'
    }
}

How it works

It will step into your git repository folder specified in src option, create a local an unsigned tag using the message options and finally push it to the specified remote option as depicted below:

git tag -a 'v.234-staging' -m 'It worked!'
git push origin --tags

License

Copyright (c) 2013 Juan Pablo Garcia Licensed under the MIT license.

Keywords

grunt

FAQs

Package last updated on 16 Jun 2014

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.