Can not publish a patch for an older version


#1

I’m trying to publish a patch version of an older version of a package. The latest version is for Atom 1.13 only, but I need to push out a fix for a version that is for Atom 1.12 only.

Here’s what I did:

$ git co v0.25.2
$ git co -b feature/branch
# edited code
$ git add --all
$ git ci -m "blah blah"
$ git push -fu origin feature/branch
# on github, merged the branch into master
$ apm publish -t 0.25.3
Publishing multi-wrap-guide@v0.25.3 ✗
Creating new version failed: Git tag not found

Uh… OK? So I created the tag myself.

$ git tag v0.25.3
$ apm publish -t 0.25.3
Publishing multi-wrap-guide@v0.25.3 ✗
Creating new version failed: Git tag not found

O… kay… I guess I need to push the tag to origin first?

$ git push origin v0.25.3
$ apm publish -t 0.25.3
Publishing multi-wrap-guide@v0.25.3 ✗
Creating new version failed: Version exists

Um no. I literally just created the tag myself. The version does NOT exist yet.

Is there a way to force apm to publish this correctly?


#2

Actually maybe it did work? Or maybe all apm publish does is push out the tag, like I did manually? Cause when I go to https://github.com/lexicalunit/multi-wrap-guide/releases it seems that the release is there, at least as far as github is concerned. I don’t know if there’s any extra book keeping that apm publish does that didn’t happen.


#3

There are some hard-coded assumptions in apm and one of them is that version numbers are always increasing. I thought that using -t was a way to get around that, but perhaps not. In looking at the database, there isn’t a v0.25.3 version of the multi-wrap-guide package.


#4

Any idea how to get that version into the database?


#5

Would you mind opening an Issue on https://github.com/atom/apm and linking it here? While I can query the database and do simple things, I don’t know if inserting a record for your proposed version might violate some assumptions in the design and cause Bad Things™ to happen. We’ll need someone to take a deeper look at it.


#6

Opened https://github.com/atom/apm/issues/654