[Question] When publishing, why are git tags pushed before prepublish hook?
See original GitHub issueWhen I run lerna publish
:
? Are you sure you want to publish these packages? Yes
lerna info execute Skipping GitHub releases
lerna info git Pushing tags...
However, my prepublish scripts run tests and they sometimes fail. But git tags are already pushed. Why is this behaviour? Should I put my testing elsewhere?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Do git tags get pushed as well? - Stack Overflow
When fetching, you are interacting with a remote repository somebody has published, which means: the set of tags that exist there are all...
Read more >Git - Tagging - Git SCM
There is currently no option to push only lightweight tags, but if you use git push <remote> --follow-tags only annotated tags will be...
Read more >scripts - npm Docs
Runs on local npm install without any arguments. Runs AFTER prepublish , but BEFORE prepublishOnly. NOTE: If a package being installed through git...
Read more >Step by step: Building and publishing an NPM Typescript ...
Postversion will run after the commit has been made. A perfect place for pushing the commit as well as the tag. "postversion" :...
Read more >[PSA] Please, please, please tag your git repositories when ...
I'm pretty sure you would want to commit before publishing though. I also delay pushing the tag and changes just in the off...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you please explain how exactly that issue marked above resolves this issue. This is seriously by far the worst caveat of lerna.
I would prefer if it wouldn’t push tags to the remote a successful publish. That way if there is a failure it is easier to back out and is more consistent to how npm operates already.
It’s 2021 and this is still a problem. Damn.