Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change log message when publishing package to other specified registry #45

Merged
merged 1 commit into from
May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/action/index.ts
Original file line number Diff line number Diff line change
@@ -28,13 +28,13 @@ async function main(): Promise<void> {
let results = await npmPublish(options);

if (results.type === "none") {
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
}
else if (results.dryRun) {
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
}
else {
console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
}

// Set the GitHub Actions output variables
6 changes: 3 additions & 3 deletions src/cli/index.ts
Original file line number Diff line number Diff line change
@@ -35,13 +35,13 @@ export async function main(args: string[]): Promise<void> {

if (!options.quiet) {
if (results.type === "none") {
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
console.log(`\n📦 ${results.package} v${results.version} is already published to ${options.registry}`);
}
else if (results.dryRun) {
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to NPM (dry run)`);
console.log(`\n📦 ${results.package} v${results.version} was NOT actually published to ${options.registry} (dry run)`);
}
else {
console.log(`\n📦 Successfully published ${results.package} v${results.version} to NPM`);
console.log(`\n📦 Successfully published ${results.package} v${results.version} to ${options.registry}`);
}
}
}
2 changes: 1 addition & 1 deletion src/npm.ts
Original file line number Diff line number Diff line change
@@ -109,7 +109,7 @@ export const npm = {
await ezSpawn.async(command, { cwd, stdio, env });
}
catch (error) {
throw ono(error, `Unable to publish ${name} v${version} to NPM.`);
throw ono(error, `Unable to publish ${name} v${version} to ${options.registry}.`);
}
},
};