Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/prepare-release-lakebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ jobs:
working-directory: packages/lakebase
run: |
pnpm exec release-it ${{ steps.version.outputs.version }} --ci

- name: Sync version
if: steps.version.outputs.version != ''
run: pnpm exec tsx tools/sync-lakebase-version.ts "${{ steps.version.outputs.version }}"

- name: Build
if: steps.version.outputs.version != ''
run: pnpm --filter=@databricks/lakebase build:package
Expand Down
2 changes: 1 addition & 1 deletion packages/lakebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@databricks/lakebase",
"type": "module",
"version": "0.2.0",
"description": "PostgreSQL driver for Databricks Lakebase with automatic OAuth token refresh",
"description": "PostgreSQL driver for Databricks Lakebase Autoscaling with automatic OAuth token refresh",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"packageManager": "pnpm@10.21.0",
Expand Down
26 changes: 26 additions & 0 deletions tools/sync-lakebase-version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env tsx
/**
* Syncs the version to the lakebase package.
* Used by the prepare-release-lakebase workflow after version bump.
*/

/**
* NOTE: This script is also used by the private secure release repo
* during the finalize step. Changes here affect the release pipeline.
*/

import { readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";

const ROOT = process.cwd();
const version = process.argv[2];
if (!version) {
console.error("Usage: sync-lakebase-version.ts <version>");
process.exit(1);
}

const pkgJsonPath = join(ROOT, "packages/lakebase/package.json");
const pkgJson = JSON.parse(readFileSync(pkgJsonPath, "utf-8"));
pkgJson.version = version;
writeFileSync(pkgJsonPath, `${JSON.stringify(pkgJson, null, 2)}\n`);
console.log(`✓ packages/lakebase/package.json → ${version}`);
Loading