From 4cbc9ae4db1a2ff022a2af8b5ee78faa5b2e3ff1 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Fri, 4 Jul 2025 12:32:21 -0700 Subject: [PATCH] **chore(version): bump version to 0.9.35 and update references** - Updated version to `0.9.35` in `README.md`, `cli-package/package.json`, and `src/utils/version.ts`. - Synced `@soulcraft/brainy` dependency version to `0.9.35` in the CLI package for consistency. - Updated npm version badge in `README.md` to reflect the new version. - Enhanced GitHub release script (`scripts/create-github-release.js`) to check and push tags to remote if they exist locally. This update ensures consistent versioning across the project and improves release automation with better tag management. --- README.md | 2 +- cli-package/package.json | 4 ++-- scripts/create-github-release.js | 23 +++++++++++++++++++++++ src/utils/version.ts | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7c75c3c0..247f1484 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Node.js](https://img.shields.io/badge/node-%3E%3D24.3.0-brightgreen.svg)](https://nodejs.org/) [![TypeScript](https://img.shields.io/badge/TypeScript-5.4.5-blue.svg)](https://www.typescriptlang.org/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) -[![npm](https://img.shields.io/badge/npm-v0.9.34-blue.svg)](https://www.npmjs.com/package/@soulcraft/brainy) +[![npm](https://img.shields.io/badge/npm-v0.9.35-blue.svg)](https://www.npmjs.com/package/@soulcraft/brainy) [//]: # ([![Cartographer](https://img.shields.io/badge/Cartographer-Official%20Standard-brightgreen)](https://github.com/sodal-project/cartographer)) diff --git a/cli-package/package.json b/cli-package/package.json index c8af8f0e..2180eaee 100644 --- a/cli-package/package.json +++ b/cli-package/package.json @@ -1,6 +1,6 @@ { "name": "@soulcraft/brainy-cli", - "version": "0.9.34", + "version": "0.9.35", "description": "Command-line interface for the Brainy vector graph database", "type": "module", "bin": { @@ -41,7 +41,7 @@ "url": "git+https://github.com/soulcraft-research/brainy.git" }, "dependencies": { - "@soulcraft/brainy": "0.9.34", + "@soulcraft/brainy": "0.9.35", "commander": "^14.0.0", "omelette": "^0.4.17" }, diff --git a/scripts/create-github-release.js b/scripts/create-github-release.js index bb6ebb27..ecfc5784 100644 --- a/scripts/create-github-release.js +++ b/scripts/create-github-release.js @@ -45,6 +45,29 @@ try { process.exit(1) } +// Check if the tag exists locally +let tagExistsLocally = false +try { + execSync(`git tag -l v${version}`, { stdio: 'pipe', cwd: rootDir }).toString().trim() === `v${version}` ? tagExistsLocally = true : tagExistsLocally = false +} catch (error) { + console.log(`Error checking if tag exists: ${error.message}`) + tagExistsLocally = false +} + +// Push the tag to remote if it exists locally +if (tagExistsLocally) { + try { + console.log(`Pushing tag v${version} to remote...`) + execSync(`git push origin v${version}`, { stdio: 'inherit', cwd: rootDir }) + console.log(`Successfully pushed tag v${version} to remote`) + } catch (error) { + console.error(`Error pushing tag to remote: ${error.message}`) + // Continue with release creation even if tag push fails + } +} else { + console.log(`Tag v${version} does not exist locally, skipping tag push`) +} + // Create the GitHub release try { console.log(`Creating GitHub release for v${version}...`) diff --git a/src/utils/version.ts b/src/utils/version.ts index 9d1a16f5..29f90d7a 100644 --- a/src/utils/version.ts +++ b/src/utils/version.ts @@ -3,4 +3,4 @@ * Do not modify this file directly. */ -export const VERSION = '0.9.34'; +export const VERSION = '0.9.35';