From 7fdaa3b7ed67245ae584fc1a617fba44c16ae7d0 Mon Sep 17 00:00:00 2001 From: David Sheldrick Date: Thu, 29 Feb 2024 17:55:36 +0000 Subject: [PATCH] use glob to pick up version files? --- apps/dotcom/version.ts | 2 +- packages/editor/src/version.ts | 2 +- packages/tldraw/src/lib/ui/version.ts | 2 +- scripts/publish-new.ts | 9 +++++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/dotcom/version.ts b/apps/dotcom/version.ts index 7bd76eb76..2a17909c7 100644 --- a/apps/dotcom/version.ts +++ b/apps/dotcom/version.ts @@ -1,4 +1,4 @@ // This file is automatically generated by scripts/refresh-assets.ts. // Do not edit manually. Or do, I'm a comment, not a cop. -export const version = '2.0.0-beta.6' +export const version = '2.0.0-beta.7' diff --git a/packages/editor/src/version.ts b/packages/editor/src/version.ts index 7bd76eb76..2a17909c7 100644 --- a/packages/editor/src/version.ts +++ b/packages/editor/src/version.ts @@ -1,4 +1,4 @@ // This file is automatically generated by scripts/refresh-assets.ts. // Do not edit manually. Or do, I'm a comment, not a cop. -export const version = '2.0.0-beta.6' +export const version = '2.0.0-beta.7' diff --git a/packages/tldraw/src/lib/ui/version.ts b/packages/tldraw/src/lib/ui/version.ts index 7bd76eb76..2a17909c7 100644 --- a/packages/tldraw/src/lib/ui/version.ts +++ b/packages/tldraw/src/lib/ui/version.ts @@ -1,4 +1,4 @@ // This file is automatically generated by scripts/refresh-assets.ts. // Do not edit manually. Or do, I'm a comment, not a cop. -export const version = '2.0.0-beta.6' +export const version = '2.0.0-beta.7' diff --git a/scripts/publish-new.ts b/scripts/publish-new.ts index a4d88fbfe..f2f3af92c 100644 --- a/scripts/publish-new.ts +++ b/scripts/publish-new.ts @@ -1,10 +1,10 @@ import { Auto } from '@auto-it/core' import fetch from 'cross-fetch' +import glob from 'glob' import minimist from 'minimist' import { assert } from 'node:console' import { SemVer, parse } from 'semver' import { exec } from './lib/exec' -import { REPO_ROOT } from './lib/file' import { nicelog } from './lib/nicelog' import { getLatestVersion, publish, setAllVersions } from './lib/publishing' import { getAllWorkspacePackages } from './lib/workspace' @@ -81,12 +81,17 @@ async function main() { packageJsonFilesToAdd.push(`${workspace.relativePath}/package.json`) } } + const versionFilesToAdd = glob.sync('**/*/version.ts', { + ignore: ['node_modules/**'], + follow: false, + }) + console.log('versionFilesToAdd', versionFilesToAdd) await exec('git', [ 'add', '--update', 'lerna.json', ...packageJsonFilesToAdd, - REPO_ROOT + '/**/*/version.ts', + ...versionFilesToAdd, ]) const auto = new Auto({