atom / apm

Atom Package Manager
https://atom.io/packages
MIT License
1.27k stars 293 forks source link

Cannot publish fork as a theme on to atom.io #404

Open ThanatchaPanpairoj opened 8 years ago

ThanatchaPanpairoj commented 8 years ago

Hi, recently, I followed the instructions to create a theme by forking from an existing one https://github.com/atom/atom-light-ui. I created a fork of the atom-light-ui repo, cloned it in desktop, and then changed the theme colors in uivariables.less and treeview.less.

I also renamed the repo and the local file and changed the .json file to this:

{
"name": "atom-soft-green-ui",
"theme": "ui",
"version": "0.42.0",
"description": "A soft green UI theme for Atom",
"repository": "https://github.com/ThanatchaPanpairoj/atom-soft-green-ui.git",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
}
}

After I was done, I committed the changes to master and synced. Then, I did an apm publish minor and I got this: Registering atom-soft-green-ui done Preparing and taggin a new version done Pushing v0.43.0 tag failed

It's published on atom.io but listed as a package https://atom.io/users/ThanatchaPanpairoj The issue is that I am trying to publish it as a theme.

thedaniel commented 8 years ago

Thanks for this, I'll take a look.

ThanatchaPanpairoj commented 8 years ago

After trying everything I can think of I finally got it to work. I made a new repo for the ui theme and published a github tag. Then I did apm publish --tag (insert github tag here) and it worked. My syntax theme had the same problem of failing to push version tag. It was a repo unlike the ui theme which had been a fork. I published a github tag on my syntax repo and did apm publish --tag(insert github tag here) and it also worked.

For all the github tags I had to make the number different from the version in the .json file. For some reason, making the version number the same on the github tag and the one in the .json file resulted in failure.

If the github tag was the same, it said "Creating new version failed: version exists". If the github tag was higher than the tag in the .json file, it said "Creating new version failed: git tag not found". If the github tag was lower, it said "Creating new package failed: package.json invalid". I tried pretty much all the tag combinations until I found that github tags in the format of "#.#" instead of "#.#.#" worked.

Now both are listed as themes: https://atom.io/themes/atom-spring-green-ui https://atom.io/themes/atom-spring-green-syntax

Kromi75 commented 8 years ago

Hi, have the same problem with a syntax theme I have created using the "generate theme package" command: apm publish minor gives the result Pushing v0.1.0 tag failed In GitHub desktop I can see that the version number in package.json has been changed. How can I find out what's wrong?

thedaniel commented 8 years ago

@ThanatchaPanpairoj glad you figured it out. @Kromi75 can you link me to the repo?

Kromi75 commented 8 years ago

Sure: https://github.com/Kromi75/visual-studio-dark-syntax

@ThanatchaPanpairoj's way worked for me, too (manually create a tag on GitHub and use "apm publish --tag..."), but still I'd like to know why "apm publish minor" didn't work.