cmanzana / node-publish

MIT License
13 stars 7 forks source link

add support for --tag #4

Open ghost opened 9 years ago

ghost commented 9 years ago

from npm help publish:

[--tag  <tag>]  Registers  the  published package with the given tag,
         such that npm install <name>@<tag> will  install  this  version.   By
         default, npm publish updates and npm install installs the latest tag.

I would like to see this support added to publish so that I can have a CI build publish a "beta" version of my software.

Unfortunately, it looks like the npm publish api may not support this ...

ghost commented 9 years ago

maybe using publish config is required?

ghost commented 9 years ago

I've submitted a pull request to add --tag support ...

but I've also implemented the following in my CI to get what I want:

NPM_CONFIG_TAG=beta npm test

(my package has a "posttest" script that calls publish)

possibly, it's better just to document that usage instead of writing more code

seanpk commented 8 years ago

--tag support isn't really working ... it checks the tag for the remote version, but when it publishes, it doesn't tag the release with that tag. ... I've got a PR coming