1.2.0 • Published 5 months ago

@witejs/release-scripts v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@witejs/release-scripts

This repo is used to share release & publish scripts for the org. Scripts should be executed from the workspace root via tsx scripts/release.ts

release

import { release } from "@witejs/release-scripts";

release({
  // Name of the repo for CI link
  repo: "release-scripts",
  // List of options. Choice will be available in following callback as `pkg`
  packages: ["release-scripts"],
  toTag: (pkg, version) =>
    pkg === "wite" ? `v${version}` : `${pkg}@${version}`,
  // Not shared until we find a new changelog process
  logChangelog: (pkg) =>
    console.log(
      execSync(
        "git log $(git describe --tags --abbrev=0)..HEAD --oneline",
      ).toString(),
    ),
  generateChangelog: (pkg, version) => {},
  // use getPkgDir when not using a monorepo. Default to `packages/${pkg}`
  getPkgDir: (pkg) => ".",
});

publish

import { publish } from "@witejs/release-scripts";

publish({
  // Used when tag is not `pkg@version`
  defaultPackage: "release-scripts",
  // use getPkgDir when not in a monorepo. Default to `packages/${pkg}`
  getPkgDir: (pkg) => ".",
});