WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Site help, bugs, suggestions/questions (https://www.wowinterface.com/forums/forumdisplay.php?f=18)
-   -   Question about Git (https://www.wowinterface.com/forums/showthread.php?t=50756)

hizuro 12-16-14 07:42 AM

Question about Git
 
I want to centralize my addons workspace and plan to setup an own git daemon on my webserver.

Maybe i'm a little bit blind but i can't find an option to use external git repositories.
If not exists, then I beg you add the option.

greetings Hizuro :)

Phanx 12-16-14 08:55 AM

If you're using Git, there's really no need for this feature -- just create a Git repo for your addon on WoWI, then add its URL as a remote in addition to the repo on your server. Then when you're ready to make a release, push to both repos instead of only to your server, come to WoWI, and click the button to auto-package a ZIP file from your repo.

Nimhfree 12-16-14 09:13 PM

I wonder if I should make use of WoWI git repository and packaging instead of still doing my own. I had no idea there was a git repo at WoWI, and perhaps had I known before I would have used it, but I have grown my own deployment system at this point. Hmmm...

Phanx 12-17-14 01:40 AM

Unfortunately WoWI does not have any way to pull in libraries when packaging from a Git repo, so it's only usable if (a) your addon does not use any libraries or (b) you hard-embed all the libraries your addon uses. Note that (b) is bad, and you should not do it, since you will quickly end up shipping outdated libraries or wasting tons of your time keeping track of library updates by hand.

I'm currently letting the Curse packager make my ZIPs, since it can pull in libraries from any type of repository, and manually uploading them to WoWI.

Previously I was using SVN and letting WoWI's packager make my ZIPs, since it can pull things in by using svn:externals and nearly all libraries are in SVN repos, and manually uploading them to Curse.

Manually uploading to WoWI is actually much less painful than manually uploading to Curse, so even if I went back to SVN at this point (very unlikely) I would probably continue packaging on Curse and manually uploading on WoWI.

There is also the WoWI Mod Uploader script, but it is rather outdated by now, and when I tried to use it a few months ago to automate uploading my Curse ZIPs to WoWI, I ran into issues on both ends since both sites have changed since 2010 but the script has not. It may work for very basic stuff, though.

p3lim 12-17-14 01:58 AM

Upon a request, Dolby was working on an API that we could use for authenticating and uploading addons through scripts, but I'm not sure where it's at right now.

This was the last thing I saw him working on:
http://api.wowinterface.com/addons/list.json

jeffy162 12-17-14 02:20 PM

@ p3lim: When I click that link, why does it give me all of my addons and a bunch of other stuff? I mean, it's all printed out really nice, but ..... WHY?
Code:

[{"id":"15330","title":"MinimapButtonFrame_ClassRings","details":"http:\/\/api.wowinterface.com\/addons\/details\/15330.json"},{"id":"15333","title":"MinimapButtonFrame_EmotionRings","details":"http:\/\/api.wowinterface.com\/addons\/details\/15333.json"},{"id":"15345","title":"MinimapButtonFrame_Shapes","details":"http:\/\/api.wowinterface.com\/addons\/details\/15345.json"},{"id":"15346","title":"MinimapButtonFrame_Rings","details":"http:\/\/api.wowinterface.com\/addons\/details\/15346.json"},{"id":"19683","title":"MinimapButtonFrame_sClassButtons","details":"http:\/\/api.wowinterface.com\/addons\/details\/19683.json"},{"id":"20318","title":"Masque_ClassButtons","details":"http:\/\/api.wowinterface.com\/addons\/details\/20318.json"},{"id":"20412","title":"Masque_Dark","details":"http:\/\/api.wowinterface.com\/addons\/details\/20412.json"},{"id":"20415","title":"MinimapButtonFrame_sDark","details":"http:\/\/api.wowinterface.com\/addons\/details\/20415.json"}]
(direct copy / paste - so you can see what I mean)
I don't do any work in any of the languages (code) used to write programs (except Lua, for sddons), so... I just don't understand THIS ^^^^.

Choonstertwo 12-17-14 03:33 PM

Quote:

Originally Posted by jeffy162 (Post 302720)
@ p3lim: When I click that link, why does it give me all of my addons and a bunch of other stuff? I mean, it's all printed out really nice, but ..... WHY?

That data is in JSON format, a common data format used by web APIs. Applications can send a HTTP request to that URL to get that list of AddOns by a particular author and then do something with the data. The details URL in each AddOn's entry appears to return an empty response, so it looks like Dolby hasn't finished that part of the API yet.

Since it's returning a list of your own AddOns without the author being specified in the URL, I'd guess that it uses the session cookie sent along with the request to determine which author's AddOns to return.

Dolby 12-17-14 03:37 PM

The above API isnt finished and you're right it uses the session cookie at the moment. Other projects kept getting in the way but I finally have a story in this next sprint to finish up the API. So its now on the schedule to get finished. :)

You'll be able to GET a list the addons you have access to (like now)

GET details about an addon of yours if you supply the ID.

POST updates to the file, and data

I want to switch the authentication to our new oauth stuff ZAM has so you would get a access token by authenticating and then use the access token in your requests to the API.

p3lim 12-18-14 02:01 AM

And I have planned a script that automatically uploads/updates an addon when it's pushed to github/curse (which fits my release environment), using the API that Dolby is talking about.

Choonstertwo 12-18-14 12:42 PM

Quote:

Originally Posted by p3lim (Post 302742)
And I have planned a script that automatically uploads/updates an addon when it's pushed to github/curse (which fits my release environment), using the API that Dolby is talking about.

It would be extremely useful to auto-upload Curse-packaged AddOn updates to WoWI. I'm looking forward to this API/script.


All times are GMT -6. The time now is 05:05 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI