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 tagging feature to npm publishing #492

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

gaiksaya
Copy link
Member

@gaiksaya gaiksaya commented Aug 27, 2024

Description

Add tagging feature to npm publishing. Synced up with @nhtruong offline and confirmed the version syntax for npmjs. Will be parsing the GH tag pushed for tagging the release. Defaults to latest.

Issues Resolved

closes #206

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sayali Gaikawad <[email protected]>
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.32%. Comparing base (f0454a4) to head (9008f3d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #492   +/-   ##
=========================================
  Coverage     84.32%   84.32%           
  Complexity       80       80           
=========================================
  Files           108      108           
  Lines           523      523           
  Branches         61       61           
=========================================
  Hits            441      441           
  Misses           26       26           
  Partials         56       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gaiksaya gaiksaya marked this pull request as draft August 27, 2024 20:29
Signed-off-by: Sayali Gaikawad <[email protected]>
Signed-off-by: Sayali Gaikawad <[email protected]>
@gaiksaya gaiksaya marked this pull request as ready for review August 27, 2024 21:53
@@ -45,3 +46,10 @@ void parameterCheck(String publicationType, String artifactPath) {
error('publicationType: github does take any argument with it.')
}
}

String getNpmTag(String githubTag) {
def matcher = githubTag =~ /-(\w+)\./
Copy link
Member

Choose a reason for hiding this comment

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

Could you explain what exactly are you trying to match with examples for beta tag and latest tag?

Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Anything after - in the version number. package.json has a version syntax of 1.0.0-beta.1 or 1.0.0
So just grabbing the same. If there is nothing after major.minor.patch, it defaults to latest

@gaiksaya
Copy link
Member Author

I'll test this on my own npm package before merging this.
Thanks!

@gaiksaya gaiksaya merged commit d88c840 into opensearch-project:main Sep 10, 2024
9 checks passed
@gaiksaya gaiksaya deleted the tagging branch September 10, 2024 18:58
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 10, 2024
Signed-off-by: Sayali Gaikawad <[email protected]>
(cherry picked from commit d88c840)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Add latest tag in publishToNpm
2 participants