mapbox / npm-internal

helps you package internal npm modules and upload them to your own s3 bucket.
MIT License
11 stars 3 forks source link

Version number conflict when using --dev #15

Closed ajashton closed 8 years ago

ajashton commented 8 years ago

I tried running npm-internal publish --dev but got the following output:

dev publish: <my-package>-

<my-package>-6.2.1 already exists.
Please either increment the version number in package.json to remove the conflict and try again.
Or for a dev package use --dev

My understanding of --dev is that it should be appending a hash to the version number to avoid duplicate version problems. Is there a bug or am I misunderstanding?

jfirebaugh commented 8 years ago

:+1:, I think this should work too.

jfirebaugh commented 8 years ago

Turned out I had an old version of npm-internal installed. Upgrading fixed this.

karenzshea commented 8 years ago

Ran into this today too - on linux machines the command must be git rev-parse HEAD rather than git rev-parse head

This might be irrelevant eventually though with https://github.com/mapbox/npm-internal/issues/18

ianshward commented 8 years ago

Is this fixed now via https://github.com/mapbox/npm-internal/pull/19 ?

freenerd commented 8 years ago

Not sure where the initial problem was, @ajashton did correctly assess that there should be no conflict since the gitsha is attached. Also #18 and #19 might have helped. Closing for now, re-open if it happens again.

ian29 commented 8 years ago

im hitting the same problem, but because this time because --dev first gets it's gitsha from git describe --tags rather than just reading package.json: https://github.com/mapbox/npm-internal/blob/master/index.js#L48

i think the ideal behavior would be to always always read the package.json version and never tags (assuming it's unlikely that if you're publishing a dev pkg that you've incremented the tag).

i can do a quickie PR that just removes https://github.com/mapbox/npm-internal/blob/master/index.js#L48

ian29 commented 8 years ago

blorp. i misread the OP. my issue is slightly different. i'll open a fresh ticket.