From c42734d02e4cfb949bbaade1255bc7852c3c6309 Mon Sep 17 00:00:00 2001 From: Michael Angelo Rivera <55844504+michaelangeloio@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:05:11 -0500 Subject: [PATCH] release test 5 (#10) * release test 3 * test release 4 * test release 5 --- .github/auto/crate-plugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/auto/crate-plugin.ts b/.github/auto/crate-plugin.ts index 4936f0a..7e05f99 100644 --- a/.github/auto/crate-plugin.ts +++ b/.github/auto/crate-plugin.ts @@ -1,6 +1,6 @@ import { Auto, execPromise, IPlugin, SEMVER } from '@auto-it/core' import { readFile, writeFile } from 'fs/promises' -import { join } from 'path' +import { join, resolve } from 'path' import { inc, ReleaseType } from 'semver' import { parse as parseToml } from 'toml' /** Get the parsed cargo.toml for the crate */ @@ -23,7 +23,8 @@ export async function getWorkspaceMembers(): Promise< > { const { toml } = await getCargoConfig() return toml.workspace.members.map(async (member: string) => { - const packagePath = join(process.cwd() || process.env.GITHUB_WORKSPACE || '', member, 'Cargo.toml') + 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 { @@ -39,6 +40,7 @@ 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)