use glob to pick up version files?
This commit is contained in:
parent
76949b62bd
commit
7fdaa3b7ed
4 changed files with 10 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
// This file is automatically generated by scripts/refresh-assets.ts.
|
// This file is automatically generated by scripts/refresh-assets.ts.
|
||||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
// 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'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file is automatically generated by scripts/refresh-assets.ts.
|
// This file is automatically generated by scripts/refresh-assets.ts.
|
||||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
// 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'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// This file is automatically generated by scripts/refresh-assets.ts.
|
// This file is automatically generated by scripts/refresh-assets.ts.
|
||||||
// Do not edit manually. Or do, I'm a comment, not a cop.
|
// 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'
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Auto } from '@auto-it/core'
|
import { Auto } from '@auto-it/core'
|
||||||
import fetch from 'cross-fetch'
|
import fetch from 'cross-fetch'
|
||||||
|
import glob from 'glob'
|
||||||
import minimist from 'minimist'
|
import minimist from 'minimist'
|
||||||
import { assert } from 'node:console'
|
import { assert } from 'node:console'
|
||||||
import { SemVer, parse } from 'semver'
|
import { SemVer, parse } from 'semver'
|
||||||
import { exec } from './lib/exec'
|
import { exec } from './lib/exec'
|
||||||
import { REPO_ROOT } from './lib/file'
|
|
||||||
import { nicelog } from './lib/nicelog'
|
import { nicelog } from './lib/nicelog'
|
||||||
import { getLatestVersion, publish, setAllVersions } from './lib/publishing'
|
import { getLatestVersion, publish, setAllVersions } from './lib/publishing'
|
||||||
import { getAllWorkspacePackages } from './lib/workspace'
|
import { getAllWorkspacePackages } from './lib/workspace'
|
||||||
|
@ -81,12 +81,17 @@ async function main() {
|
||||||
packageJsonFilesToAdd.push(`${workspace.relativePath}/package.json`)
|
packageJsonFilesToAdd.push(`${workspace.relativePath}/package.json`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const versionFilesToAdd = glob.sync('**/*/version.ts', {
|
||||||
|
ignore: ['node_modules/**'],
|
||||||
|
follow: false,
|
||||||
|
})
|
||||||
|
console.log('versionFilesToAdd', versionFilesToAdd)
|
||||||
await exec('git', [
|
await exec('git', [
|
||||||
'add',
|
'add',
|
||||||
'--update',
|
'--update',
|
||||||
'lerna.json',
|
'lerna.json',
|
||||||
...packageJsonFilesToAdd,
|
...packageJsonFilesToAdd,
|
||||||
REPO_ROOT + '/**/*/version.ts',
|
...versionFilesToAdd,
|
||||||
])
|
])
|
||||||
|
|
||||||
const auto = new Auto({
|
const auto = new Auto({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue