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

Add option to restrict publishing to greater package version only #44

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Attempting to fix greater-version output
  • Loading branch information
Tohaker committed Sep 14, 2021
commit 6a5b36028e3b40cb35a281bf4475cc6fa853e6f0
2 changes: 1 addition & 1 deletion src/action/index.ts
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ async function main(): Promise<void> {
`\n📦 ${results.package} v${results.version} is already published to NPM`
);
}
else if (options.greaterVersion && results.type === "lower") {
if (results.type === "lower") {
console.log(
`\n📦 ${results.package} v${results.version} is lower than the version published to NPM`
);
2 changes: 1 addition & 1 deletion src/npm-publish.ts
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ export async function npmPublish(opts: Options = {}): Promise<Results> {

let results: Results = {
package: manifest.name,
type: (cmp === -1 && "lower") || diff || "none",
type: (options.greaterVersion && cmp === -1 && "lower") || diff || "none",
version: manifest.version.raw,
oldVersion: publishedVersion.raw,
tag: options.tag,