uploadbot

command
v0.0.0-...-e1cb635 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2016 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Uploadbot uploads tgz snapshots of Mercurial repositories to the download section of a Google Code project.

Usage

Synopsis:

uploadbot [-f] [-pw=pwfile] [-root=rootdir] [project...]

Uploadbot reads from pwfile (default $HOME/codebot.pw) an email address and code.google.com-generated password in JSON format:

{"User": "bot@gmail.com", "Password": "3uiarglaer4rq"}

It then uploads each of the named projects, which should already be checked out into subdirectories of rootdir (default $HOME/googlecode.upload) named for the projects. For example, code.google.com/p/re2 should be checked out into rootdir/re2.

If no projects are given on the command line, uploadbot behaves as if all the subdirectories in rootdir were given.

Uploadbot assumes that the checked-out directory for a project corresponds to the most recent upload. If there are no new changes to incorporate, as reported by "hg incoming", then uploadbot will not upload a new snapshot. The -f flag overrides this, forcing uploadbot to upload a new snapshot.

The uploaded snapshot files are named project-yyyymmdd.tgz.

Initial Setup

First, find your generated password at https://code.google.com/hosting/settings and create $HOME/codebot.pw (chmod 600) in the form given above.

Next, create the work directory for the upload bot:

mkdir $HOME/googlecode.upload

Adding A Project

To add a project, first check out the repository in the work directory:

cd $HOME/googlecode.upload
hg clone https://code.google.com/p/yourproject

Then force the initial upload:

uploadbot -f yourproject

Cron

A nightly cron entry to upload all projects that need uploading at 5am would be:

0 5 * * *        /home/you/bin/uploadbot

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL