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

allowPrelease feature (issue #111) #112

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nate-pratt
Copy link

@nate-pratt nate-pratt commented Jan 2, 2024

Pull Request

Related issue

#111 - Allow publishing of pre-release version

Description

A new feature that allows the publishing of pre-release versions is introduced in this PR.

Why

When utilizing the semantic-release package's pre-release functionality, the semantic-release-chrome's chrome web api call throws a version format error.

This is prevents the plugin from publishing a new chrome extension version to a staging extension while maintaining the pre-release functionality on my develop branch.

How

Adds an optional boolean allowPrerelease field to the PluginConfig interface. When allowPrerelease is specified and set to true, the semantic version number is parsed from the given version string instead of using the raw string. For example, if 1.0.0-develop.1 is the given pre-release version, then 1.0.0 will be parsed and used for the chrome web store publishing purposes.

Screenshots

How has this been tested

  • unit tests were added for the parsePrereleaseVersion function
  • currently (as of 1/2/24) working on testing this in the context of my separate repository that utilizes the plugin to ensure the changes work e-to-e and resolve my original issue

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • Documentation
  • Ready to be merged
  • My code follows the code style of this project (run npm run ci to be sure).
  • I have read the CONTRIBUTING document.

Copy link

@envil envil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to set the version_name to nextReleaseVersion if it's a prelease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants