How do I create a zip file for download?

Asked by lborgman

How do I create a zip file for users who prefer to download that instead of using bzr?

Also, where do I find information like this? I looked at the code page, but could not find anything.

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Brad Crittenden (bac) said :
#1

Hi Lennart,

You'll need to create the zip file locally on your machine and then upload it to Launchpad.

Download files are associated with product releases, so you'll need to make a product release and then navigate to the page for it. If you're a project administrator you'll then see an option 'Add download file'. Click on it and you'll then be able to upload your zip file.

Let me know if you have further questions. If you do, please point me to the project you're working on and I may be able to give you more concrete help.

Best,

Brad

Revision history for this message
lborgman (lennart-borgman) said :
#2

Hi Brad,

Thanks for the answer, but this looks like an unnecessary constraint that takes time and makes life just more boring.

However since I understand that you are involved in Launchpad and you people on Launchpad want ideas for how to make the service better I take the chance to test how ideas are recieved:

- Please provide the possibility to create zip files for download!

A lot of users will benefit. And I can keep things here which I hope make it easier for Ubuntu package managers.

Revision history for this message
Christian Reis (kiko) said :
#3

I don't quite understand your suggestion. How would the zip file be generated -- i.e. with what contents?

Revision history for this message
Christian Reis (kiko) said :
#4

That was actually a question ;)

Revision history for this message
lborgman (lennart-borgman) said :
#5

I would like to make zip files when I release a new version of nXhtml. At that time I would like the zip file to contain all the current files in the released branch.

Please note that I am not too familiar with version control systems so I may very well use wrong terms to describe what I want. Ask for clarification if it is unclear.

Revision history for this message
Christian Reis (kiko) said :
#6

On Mon, Aug 18, 2008 at 01:35:43AM -0000, lborgman wrote:
> I would like to make zip files when I release a new version of nXhtml.
> At that time I would like the zip file to contain all the current files
> in the released branch.

That's not a very common process for an open source project. Normally a
release provides a tarball that is slightly modified from the source
tree -- for instance, configuration scripts are generated (I'm thinking
autotools here), documentation is pre-built, translations templates
extracted and other "source" content is processed into deliverables
directly useful to the end-user.

I'm copying Tim Penhey here who runs the Launchpad code hosting
application; Tim might have an opinion about whether or not it's
worthwhile implementing something to simplify your life here.
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3376 0125

Revision history for this message
lborgman (lennart-borgman) said :
#7

Maybe I should think a bit differently. I could create the zip file locally and then upload it. Some good zip tool could make that possible (7-zip in my case).

However if I do that I would like to just run a script on my pc which creates the zip file and uploads it.

Is there any good way to upload the zip file from the script? Can I say something like "here is a zip file that should be added to the download files for the latest release with the comment 'bla bla bla'"?

Revision history for this message
Christian Reis (kiko) said :
#8

Yes, you can upload using curl. Sidnei posted a short recipe to do this for plone itself:

http://sidnei.tumblr.com/post/44120270/hows-that-for-a-command-line-curl-d-o

I'm copying here for posterity:

curl -D - -o - https://edge.launchpad.net/plone/3.1/3.1.4/+adddownloadfile -<email address hidden> -F “field.description=Plone 3.1.4 buildout-based installer for Windows 2000/XP/2003/Vista (EXPERIMENTAL)” -F “field.filecontent.used=” -F “<email address hidden>” -F “field.signature.used=” -F “<email address hidden>” -F “field.contenttype=INSTALLER” -F “field.contenttype-empty-marker=1” -F “field.actions.add=Upload”

Revision history for this message
Michael Gliwinski (tzeentch-gm) said :
#9

What about providing download link (which automatically generates a tarball or zipfile) in the code browser, similar to how websvn does it (e.g. any folder within the code, including root, has a link to download in formats like tar.gz or zip; what it does is it packs the selected folder and serves it to the client, simple, huh?).

I realise this is not a proper way to make releases, but I imagine it would be enough for smaller projects. And it would immensely help chaps behind authenticating proxies (like me :)) who can't use bzr to download a branch (relevant bugs filled in about it, but the problem is upstream in curl and python's urllib, so not much you can do about it). At the moment the only way I can get e.g. some bzr plugin is to download each file separately.

Revision history for this message
keith (keithy) said :
#10

Thats what I was looking for, seems like an obvious feature.

How do people that have not installed Bazaar get to download some code to look at., easy a zip file of the latest, auto generated on demand.

Can you help with this problem?

Provide an answer of your own, or ask lborgman for more information if necessary.

To post a message you must log in.