From 09c92f3677d7f5c0a2bac0b9e4239601fffe2ba4 Mon Sep 17 00:00:00 2001 From: michaelangrivera Date: Tue, 7 Nov 2023 13:01:52 -0500 Subject: [PATCH] test release 12 --- .github/auto/crate-plugin.ts | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/.github/auto/crate-plugin.ts b/.github/auto/crate-plugin.ts index 1870d99..1dd00ec 100644 --- a/.github/auto/crate-plugin.ts +++ b/.github/auto/crate-plugin.ts @@ -1,9 +1,8 @@ import { Auto, execPromise, IPlugin, SEMVER } from '@auto-it/core' -import { readdir, readFile, writeFile } from 'fs/promises' +import { readFile, writeFile } from 'fs/promises' import { join, resolve } from 'path' import { inc, ReleaseType } from 'semver' import { parse as parseToml } from 'toml' -import { inspect } from 'util' /** Get the parsed cargo.toml for the crate */ export const getCargoConfig = async () => { const content = (await readFile(join(process.cwd() || process.env.GITHUB_WORKSPACE || '', 'Cargo.toml'))).toString() @@ -23,34 +22,8 @@ export async function getWorkspaceMembers(): Promise< }[] > { const { toml } = await getCargoConfig() - console.log('\x1b[36m%s\x1b[0m', 'testing', toml) const members = await Promise.all(toml.workspace.members.map(async (member: string) => { - console.log('\x1b[36m%s\x1b[0m', process.env.GITHUB_WORKSPACE, process.cwd()) - const files = await readdir(process.env.GITHUB_WORKSPACE || ''); - console.log('\x1b[36m%s\x1b[0m', process.env.GITHUB_WORKSPACE ) - files.forEach(file => { - console.log(file, 'workspace'); - }) - const files2 = await readdir(process.cwd() || ''); - console.log('\x1b[36m%s\x1b[0m', process.cwd()) - files2.forEach(file => { - console.log(file, 'cwd'); - }) - const anotherPath = resolve(process.cwd() || process.env.GITHUB_WORKSPACE || '', member) - console.log('\x1b[36m%s\x1b[0m', anotherPath) - const files3 = await readdir(anotherPath); - files3.forEach(file => { - console.log(file, 'w/ member'); - }) - const trimmedDir = anotherPath.replace('/does-it-throw', '') - console.log('\x1b[36m%s\x1b[0m', trimmedDir) - const files4 = await readdir(trimmedDir); - files4.forEach(file => { - console.log(file, 'w/ member trimmed'); - }) - const packagePath = resolve(process.cwd() || process.env.GITHUB_WORKSPACE || '', member, 'Cargo.toml') - console.log('\x1b[36m%s\x1b[0m', packagePath) const packageContent = (await readFile(packagePath)).toString() const packageToml = parseToml(packageContent.toString()) return { @@ -59,7 +32,6 @@ export async function getWorkspaceMembers(): Promise< packageContent, } })) - console.log('\x1b[36m%s\x1b[0m', inspect(members)) return members } @@ -68,7 +40,6 @@ export async function bumpVersions(bumpBy: SEMVER) { const workspaceMembers = await getWorkspaceMembers() const promises = workspaceMembers.map(async (member) => { const { packagePath, packageContent, packageToml } = member - console.log('\x1b[36m%s\x1b[0m', packageContent, packagePath, packageToml) const versionOld = packageToml.package.version const versionNew = inc(versionOld, bumpBy as ReleaseType)