Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Cannot publish my theme: Git tag not found #147

Closed
miwurster opened this issue Jul 11, 2014 · 22 comments
Closed

Cannot publish my theme: Git tag not found #147

miwurster opened this issue Jul 11, 2014 · 22 comments
Assignees
Labels

Comments

@miwurster
Copy link

Hey,

I have an issue publishing my Atom theme.
Every time I try to publish my tag it fails with following output:

# apm publish -t v0.1.0
Publishing github-theme@v0.1.0 ✗
Creating new version failed: Git tag not found

Acutally, the tag is available on GitHub:

# git ls-remote --tags origin
67f78e52a828c3e0c0ccb3e9b9f0fdffe7a537c6    refs/tags/v0.1.0
5664b13527cbd2664e4379718956a6ca97729086    refs/tags/v0.1.0^{}

I also tried to apm login several times with no luck (also re-created the API key)...

In addition, I browsed some Atom.io discussions as well as older issues and did everything they recommended (re-login, re-publish, ...) but nothing worked for me...

I'm running Atom v0.108.0 on a Linux Mint. I installed Atom via the webupd8team PPA. In addition here's the output of apm -v:

apm  0.70.0
npm  1.4.4
node 0.10.26
python 2.7.6
git 1.9.1

I actually don't know what to do next. Hope you guys can give me a hint...

Thanks in advance,
Michael

@kevinsawicki
Copy link
Contributor

Is this the theme you are trying to publish? https://atom.io/packages/github-theme

@miwurster
Copy link
Author

No, that's another one. So, does this mean it's a naming conflict?

@kevinsawicki
Copy link
Contributor

Looks to be.

@thedaniel should this have shown some other error such as name already taken?

@thedaniel
Copy link
Contributor

Yep.

@thedaniel
Copy link
Contributor

Also, apm should maybe make sure a user can admin a package before trying to push a version.

@kevinsawicki
Copy link
Contributor

@thedaniel what API would test for that without making any changes?

@thedaniel
Copy link
Contributor

@kevinsawicki I think we'd need to add one.

@kevinsawicki
Copy link
Contributor

sounds good

@AbeEstrada
Copy link

It happened to me too trying to publish a patch for this repo https://github.com/AbeEstrada/atom-hex

$ apm publish patch

Preparing and tagging a new version ✓
Pushing v0.3.6 tag ✓
Publishing hex@v0.3.6 ✗
Creating new version failed: Git tag not found

The tag is created in the repo https://github.com/AbeEstrada/atom-hex/releases/tag/v0.3.6
I have the latest Atom version from MASTER, I compile it daily.

$ apm --version
apm  0.89.0
npm  1.4.4
node 0.10.26
python 2.7.8
git 2.0.4

@kevinsawicki
Copy link
Contributor

And if you run apm publish --tag v0.36.0, does it succeed?

@AbeEstrada
Copy link

I forgot to include that detail.

$ apm publish --tag v0.3.6

TypeError: Cannot read property 'rename' of undefined
    at Publish.module.exports.Publish.publishPackage (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/publish.js:244:52)
    at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/publish.js:440:26
    at /Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/publish.js:157:20
    at Request._callback (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/publish.js:139:20)
    at Request.self.callback (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/request/request.js:123:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/request/request.js:893:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/node_modules/request/request.js:844:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)

kevinsawicki added a commit that referenced this issue Aug 14, 2014
@kevinsawicki
Copy link
Contributor

@AbeEstrada thanks so much for reporting that stack trace, that is a regression for sure, and I just pushed a fix for it, it will be included in 0.122 which should be out tomorrow morning.

@kevinsawicki
Copy link
Contributor

Can you try opening /Applications/Atom.app/Contents/Resources/app/apm/node_modules/atom-package-manager/lib/publish.js and adding the following after line 242:

if (options == null) { options = {}; }

Then run apm publish --tag v0.36.0 again.

@AbeEstrada
Copy link

@kevinsawicki now it doesn't show an error, but still can't publish

$ apm --version
apm  0.90.0
npm  1.4.4
node 0.10.26
python 2.7.8
git 2.0.4

$ apm publish --tag v0.3.6
Publishing hex@v0.3.6 ✗
Creating new version failed: Git tag not found

@kevinsawicki
Copy link
Contributor

Thanks for trying it again, I'm going to cc @thedaniel now since the tag does appear to be there and that message is coming back from atom.io

@thedaniel
Copy link
Contributor

Acknowledged, I'll take a look at this soon.

@thedaniel thedaniel self-assigned this Aug 14, 2014
@thedaniel
Copy link
Contributor

I found a bug in the Atom.io API that has to do with how it checks GitHub for tags. I will update this issue when I have a fix out.

@thedaniel
Copy link
Contributor

@AbeEstrada do you mind giving this another try? I've made a small change in the relevant code that I believe should solve your problem.

@AbeEstrada
Copy link

@thedaniel now I get this message:

$ apm publish --tag v0.3.7
Publishing hex@v0.3.7 ✗
Creating new version failed: package.json not found

Here is the package.json https://github.com/AbeEstrada/atom-hex/blob/master/package.json

@thedaniel
Copy link
Contributor

Well, actually that's great. This process has helped uncover more things to fix :)

@AbeEstrada - would you mind trying once more?

@AbeEstrada
Copy link

@thedaniel thanks

$ apm publish --tag v0.3.7
Publishing hex@v0.3.7 ✓

$ apm publish patch
Preparing and tagging a new version ✓
Pushing v0.3.8 tag ✓
Publishing hex@v0.3.8 ✓

@thedaniel
Copy link
Contributor

Wonderful. Thank you for the detailed report and your help testing the fixes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants