use glob to pick up version files?

This commit is contained in:
David Sheldrick 2024-02-29 17:55:36 +00:00
parent 76949b62bd
commit 7fdaa3b7ed
4 changed files with 10 additions and 5 deletions

View file

@ -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'

View file

@ -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'

View file

@ -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'

View file

@ -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({