Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

554 B
Raw Blame
/**
 * Custom updater for pyproject.toml
 * Used by standard-version to bump version in pyproject.toml
 */

const stringifyPackage = require('stringify-package');
const detectIndent = require('detect-indent');
const detectNewline = require('detect-newline');

module.exports.readVersion = function (contents) {
  const match = contents.match(/^version = "(.*)"$/m);
  return match ? match[1] : null;
};

module.exports.writeVersion = function (contents, version) {
  return contents.replace(
    /^version = ".*"$/m,
    `version = "${version}"`
  );
};