Tag current version: the tag name will be extracted from
the `version` field in the `package.json` file.

@param {function} done The `done` callback.
@return {void}
174268
function tagRelease(done) {
  fs.readFile(config.pkg, 'utf-8', (err, content) => {
    if (err) {
      done(err);
      return;
    }

    const pkg = JSON.parse(content);
    const version = pkg.version;
    git.tag(`v${version}`, `release: tag version ${version}`, done);
  });
}
428301
def resolve_tag_repo_ref!(tag)
      return unless tag.has_repo?
      repo = core.repo_manager.find_repository(tag.repo)
      # set latest version
      if tag.has_ref? === false
        if repo.has_package_versions?
          tag.set_ref repo.latest_package_version
        else
          tag.set_ref repo.current_ref
        end
      else
        unless repo.has_ref?(tag.ref)
          new_ref = repo.latest_version(tag.ref)
          raise "error" if new_ref.nil?
          tag.set_ref new_ref
        end
      end
    end
723829
def _check_if_tag_already_exists(self):
        """"""
        version = self.data['new_version']
        if self.vcs.tag_exists(version):
            return True
        else:
            return False
340821
function version() {
  const packageJson = require(path.resolve(__dirname, '..', 'package.json'));
  logger.info('@blackbaud/skyux-builder: %s', packageJson.version);
}
893502
def get_tagged_version(self):
		
		tags = list(self.get_tags())
		if 'tip' in tags and not self.is_modified():
			tags = self.get_parent_tags('tip')
		versions = self.__versions_from_tags(tags)
		return self.__best_version(versions)
763086
function(version) {
        var current = [version.major, version.minor, version.patch].join('.');
        var required = '>= 1.6.0';
        if (!semver.satisfies(current, required)) {
          exports.halt();
          grunt.log.writeln();
          grunt.log.errorlns(
            'In order for this task to work properly, PhantomJS version ' +
            required + ' must be installed, but version ' + current +
            ' was detected.'
          );
          grunt.warn('The correct version of PhantomJS needs to be installed.', 127);
        }
      }
1085433
protected function incrementTag($current, $major, $minor, $patch, $preRelease, $preIncrement)
    {
        // Current version
        $this->line('');
        $this->info("The current release version is: {$current}.");

        // Simple options
        $tag['major'] = 'v'.($major+1).'.0.0';
        $tag['minor'] = "v{$major}.".($minor+1).'.0';
        $tag['patch'] = "v{$major}.{$minor}.".($patch+1);

        // Next RC versions
        $majorPlus = $major + 1;
        $minorPlus = $minor + 1;
        $tag['rcmajor'] = "v{$majorPlus}.0.0-rc";
        $tag['rcminor'] = "v{$major}.{$minorPlus}.0-rc";

        // Increment RC version
        if ($preRelease) {
            $extra = ((($preIncrement + 1) > 1) ? '.'.($preIncrement + 1) : '');
            $tag['rc'] = "v{$major}.{$minor}.{$patch}-rc{$extra}";
        }

        // Check if user provided the release
        $release = $this->argument("release");

        // If release not specified, ask the user
        if (!$release) {
            $this->line('');
            $release = array_search($this->choice("Please select the next release version:", $tag), $tag);
        }

        // Check valid release
        if (!isset($tag[$release])) {
            $this->error("Unknown release type: {$release}");
            return false;
        }

        return $tag[$release];
    }
1165576
def tag_exists(self, version):
        
        for tag in self.available_tags():
            if tag == version:
                return True
        return False
926941
def tag():
    """"""
    if check_unstaged():
        raise EnvironmentError('There are staged changes, abort.')
    with open(str(INIT_PATH)) as f:
        metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", f.read()))
    version = metadata['version']
    check_output(['git', 'tag', version, '-m', 'Release v{}'.format(version)])
937232
function(xml, command, version) {
		var formatVersion = version || JSDAS.Formats.current;
		var format = JSDAS.Formats[formatVersion][command];
		var json = JSDAS.Parser.parseElement(xml, format);
		return json;
	}
737205
function getNewVersions() {
  return getTags()
    .then(tags => {
      var newVersions = []
      for(tag of tags) {
        if (semver.gt(tag.name, update.latest) || (
            semver.eq(tag.name, update.latest) && (semver(tag.name).build[0] || 0) > (semver(update.latest).build[0] || 0)
          )) {
          newVersions.push(tag)
        }
      }
      newVersions.reverse()
      // order versions from lower to greater
      console.log(chalk.blue('New versions available: ' + (newVersions.map(v => v.name).join(', ') || 'none') + '.'))
      return newVersions
    })
    .catch(e => console.log(e.stack))
}
594011
function tag() {
  var v = 'v' + pkg.version;
  var message = 'Release ' + v;

  return gulp.src(["./package.json", "./bower.json"])
    .pipe(git.commit(message))
    .pipe(git.tag(v, message))
    ;
    // .pipe(git.push(remote, branch, {args: '--tags'}))
}
242124
function map (msg, done) {
    var metric = {
      source: msg.source,
      name: 'my-metric',
      values: {val: msg.payload.val},
      tags: {tag: msg.payload.tag}
    }

    done(null, [metric])
  }
1329288
function processVersioned (entity, version, versions) {
  quantum.select(entity)
    .selectAll('versioned', {recursive: true})
    .forEach(versioned => {
      const candidateVersionSelections = versioned.selectAll('version')
      const currentVersion = mostRecentVersion(version, candidateVersionSelections, versions)
      if (currentVersion) {
        versioned.addAfter(currentVersion.content())
      }
      versioned.remove()
    })
}
1174647
def version_str(self):
        
        vs = str(self.release)
        if self.tag is not None:
            vs += '@{t}'.format(t=self.tag)
        elif self.commit is not None:
            vs += '@{c}'.format(c=self.commit)
        return vs
261076
function (done) {
            var select = {};
            select[pathName] = 1;

            Model.findOne({_id: model}, select, function (err, doc) {
              if (err) return done(err);
              if (!doc) return done(null, []);

              done(null, doc[pathName].reduce(function (o, friend) {
                o[friend._id] = friend.toObject();
                return o;
              }, {}));
            });
          }
133047
function (done) {
      var p = clone(pkg);
      delete p.devDependencies;
      var content = JSON.stringify(p, null, 2);
      write_if_not_exists('package.json', content, done);
    }