shipjs icon indicating copy to clipboard operation
shipjs copied to clipboard

Getting the branch in prepare for multiple releases

Open vinayakkulkarni opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. What I'm trying to achieve is setting the next and latest tags based on branches. I want ship.js to trigger a new latest release when on branch main & next release when on branch next.

Describe the solution you'd like Ability to modify the publishCommand by using git branches

Describe alternatives you've considered N/A.

Additional context N/A.

vinayakkulkarni avatar Jul 21 '21 04:07 vinayakkulkarni

Hi @vinayakkulkarni Do you think publishCommand works for you?

({ isYarn, tag, defaultCommand, dir }) => defaultCommand

It may not have all the necessary information for you, but if you maintain main and next branches and have different major versions for them, then you could read package.json and according to decide which tag to publish it with. Does it make sense to you?

And asynchronous form of publishCommand function is not supported yet, so you'd better use something like fs.readFileSync() for it.

Let me know how it goes and if you have any question.

eunjae-lee avatar Jul 21 '21 07:07 eunjae-lee