src/commands.js
function tag(options) {
    assert.ok(options.tag, 'tag name is mandatory');
    if (options.annotated) {
      assert.ok(options.message, 'message is mandatory when creating an annotated tag');
    }

    var args = [
      'tag',
      options.tag,
      options.annotated ? '-a' : null,
      options.message ? '-m' : null,
      options.message ? options.message : null
    ];

    return git(args)
        .then(silent);
  }
function tag(options) {
    assert.ok(options.tag, 'tag name is mandatory');
    if (options.annotated) {
      assert.ok(options.message, 'message is mandatory when creating an annotated tag');
    }

    var args = [
      'tag',
      options.tag,
      options.annotated ? '-a' : null,
      options.message ? '-m' : null,
      options.message ? options.message : null
    ];

    return git(args)
        .then(silent);
  }
function tag ( options ) { assert . ok ( options . tag , 'tag name is mandatory' ) ; if ( options . annotated ) { assert . ok ( options . message , 'message is mandatory when creating an annotated tag' ) ; } var args = [ 'tag' , options . tag , options . annotated ? '-a' : null , options . message ? '-m' : null , options . message ? options . message : null ] ; return git ( args ) . then ( silent ) ; }
Creates a git tag
Executes `git tag v1.0.0 -m "v1.0.0" -a`

@example
var git = require('gitftw');

git.tag({
tag: 'v1.2.0'
})

@memberof git
@type {command}

@param {Object} options The options object. All its properties are {@link Resolvable}
@param {Resolvable|String} options.tag The tag name
@param {Resolvable|String} [options.message] The tag message. Mandatory when creating
an annotated tag
@param {Resolvable|Boolean} [options.annotated] Should this tag be annotated?
@param {callback} [cb] The execution callback result
@returns {Promise} Promise Resolves with undefined
Creates a git tag Executes git tag v1 . 0 . 0 - m v1 . 0 . 0 - a