My favorites | Sign in
Google
             
Search
for
Updated Feb 04, 2009 by artdent
ScriptedUploads  
How to do scripted uploads to your Google Code project

Do I have to use my web browser to upload files? Nope, using a browser is not the only way.

We want to make it as easy as possible to upload files to your project, so there are several ways to script uploads:

Python Script

We've dropped a handy script called googlecode_upload.py into the Subversion repository for the Google Code Support Project. Run googlecode-upload.py --help for the details in how to use the script.

Ant Task

Google Code user Jonathan Fuerth has graciously written an ant task to script uploads to your project at Google Code. You can get it from (where else?) the ant-googlecode project on Google Code. The ant task is available from here: http://ant-googlecode.googlecode.com/svn/trunk/

The content on this page created by Google is licensed under the Creative Commons Attribution 3.0 License. User-generated content is not included in this license.


Comment by tatarynowicz, Jul 23, 2007

Shouldn't there be an option for creating a release package directly from the repository?

Comment by perica.z...@gmail.com, Jul 30, 2007

where can I find specifications of allowed file size / storage? I'm interested in: - max allowed file size per file - max allowed total storage for all releases in a project (deprecated and active)

grtz

Perica

Comment by jrobbins, Aug 01, 2007

perica.zivkovic: The max file size and overall available space can be found on the "New Download" page under the "Downloads" tab in your project's web UI.

Comment by mstormo, Aug 03, 2007

Would be nice if this script to be extended have the ability to:

- Remove files from the download area - Deprecate files

Since it would make it easier to create daily binary snapshots, and keep your files under the quota limit.

Comment by cdukes, Sep 19, 2007

Great tool, but (as I've just discovered) it doesn't check to see if the file will push me over Quota -- it just keeps re-prompting me for password (latest googlecode.py, the older one just threw a 403 forbidden error)

Comment by Scorcher24, Oct 25, 2007

Quote: Shouldn't there be an option for creating a release package directly from the repository?

THIS would be very handy!! I really would like to see that. Maybe you can add a cooldown of X hours, if the diskload gets too much. rya.

Comment by Jochen.Jung, Nov 12, 2007

Yes, it would be realy helpfull to create new builds directly from repository. Even better would be the option to automaticaly create a nightly build of the svn code in the download area.

Comment by justin.forest, Dec 10, 2007

It would be very handy if the script could deprecate (or delete) older files with the same name.

Comment by jrobbins, Dec 10, 2007

justin.forest: actually that is not a good idea. Filenames are the way that your end users and also distributions or other open source projects that reuse your releases identify the release that they got. If you ever change the contents but use the same filename, you make life harder for everyone downstream from you. Instead, it better to use new filenames for each release. We consider that a best practice and our toolset is designed with that in mind.

Comment by dewannes, Dec 19, 2007

Why not simply provide downloads from subversion? Unlike CVS, it uses binary diff tools to minimize extra storage. Simple put a .zip file somewhere in the SVN repository and create a tag with each release. Then put a subversion link to the tagged .zip file. The only downside is that the "download" tab is not used, so the user's attention needs to be drawn away from it.

Comment by sfouad, Jan 28, 2008

@dewannes

That's a nice workaround, but it still doesn't make sense why there wouldn't be any built-in facilitation for developers to offer their files for download.

Of course, I think the best thing to do is to have it automatically zip or tarball the repository, but there is other alternatives such as letting us set a RSS feed the page can sync with and we can dictate which files should be included.

Comment by sergi.gisbert, Feb 07, 2008

It would be nice to delete deprecated files, as they only are occuping some disk space that may be useful for next releases. Anyway to do it?

Thnx!

Comment by jrobbins, Feb 07, 2008

sergi.gisbert: nope, releases are considered archival. Once they are released as open source, they are always supposed to be out there. If you run low on quota you can simply ask for more. There is a link on the "New Download" page that you clidk to file a request for more quota.

Comment by linux.fabricio, Feb 25, 2008

omg nice , python ownz!

Comment by faivrem, Feb 27, 2008

Quote: Shouldn't there be an option for creating a release package directly from the repository?

See issue 810 http://code.google.com/p/support/issues/detail?id=810

Star it !

Comment by romihardiyanto, Mar 08, 2008

Would be nice if there is some progress bar for -v

Comment by carlos22, Apr 11, 2008

Hey guys, is there a way to upload files from deploy phase in a maven project? I tried the maven-upload-plugin and webdav connection, but it doesn't work...

thx.

Comment by Gabriel.Pettier, Apr 21, 2008

drNoviko: juste re-release with a new name, and think twice next time before releasing... the provided reason (it's released as open source and should remain accessible until end of times) seems fine to me.

Comment by fr...@meruvian.org, Apr 26, 2008

we need a ftp or resume like, so we can still upload even we are in bad internet connection.

Comment by xsonnek, May 11, 2008

Have you any idea?

python googlecode_upload.py -s "vsmodel" -p "bpmn-orders" SystemDodavatele?.zip Traceback (most recent call last):

File "googlecode_upload.py", line 312, in <module>
sys.exit(main())
File "googlecode_upload.py", line 300, in main
options.config_dir, options.user)
File "googlecode_upload.py", line 227, in upload_find_auth
(svn_username, password) = get_svn_auth(project_name, config_dir)
File "googlecode_upload.py", line 93, in get_svn_auth
auth = svn_config_read_auth_data(SVN_AUTH_CRED_SIMPLE, realm, config_dir)
File "/usr/lib/python2.5/site-packages/libsvn/core.py", line 2450, in svn_config_read_auth_data
return apply(core.svn_config_read_auth_data, args)
TypeError?: svn_config_read_auth_data() takes at least 4 arguments (3 given)

Comment by ozgurcemsen, May 17, 2008

Too bad, I didn't see the ant-googlecode project when I was trying to pack MiaCMS. For the MiaCMS project we use py-run Ant task to kick off the googlecode_upload.py

	<!-- Runs the fullrelease task and uploads the nightly release on google code. -->
	<target name="nightly" depends="init">
		<copy file="${mia.dist}/${DSTAMP}-full/${mia.full.gz}" tofile="${mia.dist}/${DSTAMP}-full/${DSTAMP}_${mia.full.gz}" />
		<py-run script="${lib.dir}/googlecode/googlecode_upload.py">
			<arg value='--config-dir=none' />
			<arg value='-p miacms' />
			<arg value='-s ${DSTAMP} MiaCMS Nightly build of 4.6 trunk.' />
			<arg value='-u ${svnant.repository.user}' /> 
			<arg value='-l Nightly,Type-Archive,OpSys-All' /> 
			<arg value='${mia.dist}/${DSTAMP}-full/${DSTAMP}_${mia.full.gz}' />
		</py-run>
	</target>

Also came across the issue above this post; but didn't dig much deep on it. Instead chose the lazy path; simply dumped the user_name and password around line 250. :)

Comment by andematunum, Jun 16, 2008

The "discard" button in the Download tool doesn't work on my firefox, neither on Safari.

Regards

Comment by berlin.brown, Jul 16, 2008

I can't believe their is no intuitive way to delete files. the discard button doesn't work.

What if submitted personal information in a download.

Comment by jrobbins, Jul 16, 2008

berlin.brown: You can delete downloads that were mistakenly updated. Downloads only become permanent after a period of time or a certain number of people download it.

So, if you upload a file and think "Oops!": just click somewhere on the row other than the download file name itself to get to the download detail page. Then, use the delete link in the toolbar (right under the main tabs).

Comment by astroanu2004, Aug 11, 2008

Why is there no button to delete any downloads ive made.??

Comment by jrobbins, Aug 11, 2008

astroanu2004: You can delete downloads that you uploaded by mistake. Just click anywhere on the table row other than the filename. You will see the download detail page, e.g., http://code.google.com/p/chalana/downloads/detail?name=Chalana%202.2.0.16.exe&can=1&q= There is a "Delete" link on the toolbar directly under the main tabs.

You can delete downloads that have not been around too long and have not been downloaded too many times. After a file has become part of your project's history, it can be marked deprecated rather than deleted. See: Best Practices: archival downloads.

Comment by ibrahim.awwal, Aug 11, 2008

I'm trying to get started with Ant, and I found this page. How do I use the ant scripts provided on the project page? Do I need to put the .jar file in my java libs directory or anything like that?

Comment by ebisudave, Aug 21, 2008

Just so that no one gets tripped up with copying and pasting like I do, as of August 22 2008, the instructions for the Python script contain a small mismatch. They say:

"We've dropped a handy script called googlecode_upload.py into the Subversion repository for the Google Code Support Project. Run googlecode-upload.py --help for the details in how to use the script."

Note that in one case the name of the script uses an underscore, and then in the next one it uses a hyphen. Whoever has editing on this page should probably change the second instance to use an underscore.

Comment by jfuerth, Aug 26, 2008

@ibrahim.awwal:

There are several options. If you use the example build.xml snippet at http://code.google.com/p/ant-googlecode/wiki/Definition then you can put the jar file wherever you like. To make setup easy for other project members, you could even check the jar file into your project.

Comment by jeffrey.wizkid, Sep 05, 2008

Is there an page where i can find the specs on how to do a upload to an GoogleCode? download page, because i'd like to make an PHP5 Version

Comment by zhushenli, Dec 02, 2008

It seems when I try to upload the package on Downloads, Google server prompt and ask me for the username/password, and it keeping tell me my username/password is wrong, which I get from profile and setting. Confusing.

Comment by gabriel....@gmail.com, Dec 04, 2008

anyway to close issues with svn commits?

any svn hooks anywhere?

Comment by fayland, Jan 11, 2009

could you please add some lines to mention that there is a Perl port of this script.

http://search.cpan.org/dist/Google-Code-Upload/

Thanks.

Comment by earonesty, Feb 18, 2009

I just wasted an hour writing this:

http://ipc-lite.googlecode.com/files/send2goog

specificially because fayland didn't have access to edit the Wiki and put a proper link in....

Comment by earonesty, Feb 25, 2009

there are 2 perl uploaders that aren't mentioned:

http://send2goog.googlecode.com http://search.cpan.org/dist/Google-Code-Upload/

i think google people don't like perl. there's something about python people and perl people that don't mix.

Comment by mvi...@gmail.com, Feb 26, 2009

> i think google people don't like perl. there's something about python people and perl people that don't mix.

common sense?

just kidding xD

Comment by mikenere...@gmail.com, Mar 05, 2009

I'd love to see a maven plugin to deploy the jar, source jar, and javadocs jar.

I deploy all three for each release at http://architecturerules.googlecode.com

The plugin should also set the three downloads to featured, and set all other downloads to deprecated. Anyone want to get on that ( :

Comment by karl.michael.davis, Apr 04, 2009

Echoing mikenereson, it really would be great if there was a way to deploy Apache Maven projects hosted with Google Code.

Maven deployment repositories require a directory structure, which Google Code's files/downloads area does not allow for. In addition, Maven repositories generally include metadata files that are changed every deployment, which are used to speed artifact retrieval.

Right now folks hosting Maven projects at Google Code have to maintain a separate Maven repository elsewhere for their users to access. Alternatively, projects can hack around these limitations by dual-purposing their SVN repo as a Maven respository, which isn't a very elegant solution.

Bringing this feature "in-house" to Google Code would be very convenient for developers. It would also be a nice discriminator for Google Code: as far as I know, Sourceforge doesn't yet support this either.

References:

Comment by karl.michael.davis, Apr 04, 2009

As a follow-up to those looking for information on the hack I mentioned above...

The always-prolific Koshuke has apparently created a plugin that makes using a SVN repository as a Maven repository very simple. The following blog entry details the simple steps to make this happen: http://www.jroller.com/mrdon/entry/find_of_the_day_wagon

Comment by deepyogurt, Apr 05, 2009

Does anyone have any idea how to set the limit for downloads to be lower than the default 100MB? I am working on a project that will never ever ever be able or wish to deal with files that big. Thanks...

-Bob

Comment by jim.pxie, Apr 26, 2009

How do I update a file content that is already in a download list instead of deleting first and then uploading it?

Jim

Comment by jrobbins, Apr 27, 2009

jim.pxie: you probably don't want to update the contents of a file through a script. Deleting and reuploading is really only useful when you mistakenly upload a corrupted file. It just won't work well with our downloads tool because of caching.

If you have a process where you release new versions on a regular basis, they really should have unique names. Or, if you need to update the contents of a small file over time it should be under version control.

Comment by jim.pxie, Apr 27, 2009

The reason I ask is because I publish http://dreamsource-orm.googlecode.com/files/dreamsource2_0_0_04062009_GWT_src.jar to one populate forum I can not change. Now this file is deprecated because I find some bugs. I fixed them and upload the new version. But users still download this deprecated file from the old link. I want to replace http://dreamsource-orm.googlecode.com/files/dreamsource2_0_0_04062009_GWT_src.jar with the same content as http://dreamsource-orm.googlecode.com/files/dreamsource2_0_1_04202009_GWT_src.jar and keep the old link name.

Jim

Comment by mrshrinkray, May 22, 2009

An option zip up your trunk/branch and turn it into a release would be ideal. Not that useful for projects requiring compilation, but for Javascript/html and scripted language projects it would be useful.


Sign in to add a comment