Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vitejs/release-scripts
@vitejs release scripts
https://github.com/vitejs/release-scripts
Last synced: about 1 month ago
JSON representation
@vitejs release scripts
- Host: GitHub
- URL: https://github.com/vitejs/release-scripts
- Owner: vitejs
- License: mit
- Created: 2023-01-08T02:26:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-18T13:13:01.000Z (6 months ago)
- Last Synced: 2024-05-18T14:26:55.389Z (6 months ago)
- Language: TypeScript
- Size: 142 KB
- Stars: 41
- Watchers: 5
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @vitejs/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
```ts
import { release } from "@vitejs/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 === "vite" ? `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
```ts
import { publish } from "@vitejs/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) => ".",
// Publish with provenance https://docs.npmjs.com/generating-provenance-statements
provenance: true,
// Package manager that runs the publish command
packageManager: "pnpm",
});
```