1
0
Fork 0
docsearch/scripts/getBundleBanner.ts
Paul Jankowski c94eafbbee
chore: Update to use tsdown for build system (#2824)
* chore: Update to use tsdown for build system

* fix: docsearch-react build

* fix: lint

* fix: glob resolved to incorrect version
2026-02-20 13:24:32 -05:00

9 lines
425 B
TypeScript

import { execSync } from 'child_process';
export function getBundleBanner(pkg: any): string {
const lastCommitHash = execSync('git rev-parse --short HEAD').toString().trim();
const version = process.env.SHIPJS ? pkg.version : `${pkg.version} (UNRELEASED ${lastCommitHash})`;
const authors = '© Algolia, Inc. and contributors';
return `/*! ${pkg.name} ${version} | MIT License | ${authors} | ${pkg.homepage} */`;
}