branches/get-tags.js

semantic-release · lib/branches/get-tags.js · javascript · MIT
dev-tools, tag:knn-classified

Utility to parse git tags for semantic-release branches.

// Source: https://github.com/semantic-release/semantic-release | License: MIT | Copyright 2017 Contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { escapeRegExp, template } from "lodash-es";
import semver from "semver";
import pReduce from "p-reduce";
import debugTags from "debug";
import { getTags, getTagsNotes } from "../../lib/git.js";

const debug = debugTags("semantic-release:get-tags");

export default async ({ cwd, env, options: { tagFormat } }, branches) => {
  // Generate a regex to parse tags formatted with `tagFormat`
  // by replacing the `version` variable in the template by `(.+)`.
  // The `tagFormat` is compiled with space as the `version` as it's an invalid tag character,
  // so it's guaranteed to no be present in the `tagFormat`.
  cons

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key