use glob to pick up version files?

pull/3011/head
David Sheldrick 2024-02-29 17:55:36 +00:00
rodzic 76949b62bd
commit 7fdaa3b7ed
4 zmienionych plików z 10 dodań i 5 usunięć

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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