-
Notifications
You must be signed in to change notification settings - Fork 205
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 sbt plugin #1962
add sbt plugin #1962
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1962 +/- ##
=======================================
Coverage ? 80.26%
=======================================
Files ? 66
Lines ? 5380
Branches ? 1249
=======================================
Hits ? 4318
Misses ? 705
Partials ? 357
Continue to review full report at Codecov.
|
@hipstersmoothie hi! thanks for publishing a canary release. I just tried installing it on CI and running
in the config I refer to the plugin as just |
It looks like |
Ok, done in bef0fe9 👌 |
kicked off another canary for you |
Thanks! Just tried it out and it works as expected 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good so far! Will def want to add some tests. Those tests will require lots of mocking of the exec function. You should be able to looks at other plugins and emulate their testing setup. Mainly just want to make sure the logic works and your options do something.
@hipstersmoothie I wrote some tests. I haven't quite wrapped my head around mocking with Jest yet, so it's not very smooth. But it's better than nothing and actually tests some functionality/configuration. I would appreciate any pointers on how to improve it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look great! Looks mostly like other tests, nothing to suggest really. Jest mocks can be tricky though, I agree
@hipstersmoothie done: bd18523 👌 |
@hipstersmoothie could you give it another look? |
🚀 PR was released in |
What Changed
Copy-pasted code from the git-tag, added relevant sbt commands (set version, publish, etc.), added canary hook.
Why
sbt is the de facto standard build tool for Scala projects.
I've tried to integrate with sbt through the exec plugin, it works perfectly for normal releases (only
publish
hook), but gets quite hairy for canaries:Mainly because canary combines publishing and versioning and requires new version as an output. And because sbt is not made for CLI scripts, so it's not easy to get the current version out of it.
So I took a stab at writing a proper plugin for sbt.
Todo:
I'm new to JavaScript/TypeScript, so take this with a grain of salt. If any code needs refactoring, I'll be grateful for pointers 🙏
I really have no idea how to test this 😥 especially with mocking and all. I've tested it manually on an actual project though.
Change Type
Indicate the type of change your pull request is:
documentation
patch
minor
major
🐤 Download canary assets:
auto-linux--canary.1962.23960.gz
auto-macos--canary.1962.23960.gz
auto-win.exe--canary.1962.23960.gz
📦 Published PR as canary version:
under canary scope @[email protected]
✨ Test out this PR locally via: