I'd like to be able to fully-automate the process of packaging the release of an application (in Xcode) via shell script and I'd like the zip archive that is released to be a download on bitbucket. Is there a way to programmatically make a (zip) file available as a download on bitbucket?
+1
A:
Not sure you can do it with a shell script, or at least it'd be somewhat tough. There is a bitbucket api (http://bitbucket.org/api/) but it looks read-only for the time being.
My suggestion is to use some kind of client-side http/url library in your favorite language to download the .../downloads page, grab all the <input>
's of the form, and repost an upload. You'll want to look into posting multipart/form-data
POST's. Other than that, I'm not sure I can be of much help.
xyld
2010-05-07 01:34:38
This is what I suspected--even just confirming my suspicion is helpful. I'm fairly confident that I can use `curl` to put together the necessary GETs/POSTs, but I was really hoping to avoid this kind of screen-scraping-like upload, especially because of authentication issues.
Isaac
2010-05-07 01:51:09
@isaac yeah, you could try shell and curl, but it might just be easier to use `libcurl` or something... the scraping isn't perfect, but it's the best you can do I think :-/ You might consider posting on bitbuckets user mailing list
xyld
2010-05-07 01:54:42