summaryrefslogtreecommitdiff
path: root/scripts/upload-docs.sh
blob: c450270cb6504bf1724723325ea5daf8019ef8b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DOCDIR="$DIR/../doc"

# this command requires ssh configured to the proper target
tar czf - -C "$DOCDIR/html" . | ssh psycoweb tar xzvf - -C docs/current

# download the script to upload the docs to PyPI
test -e "$DIR/pypi_docs_upload.py" \
    || wget -O "$DIR/pypi_docs_upload.py" \
        https://gist.githubusercontent.com/dvarrazzo/dac46237070d69dbc075/raw

# this command requires a ~/.pypirc with the right privileges
python "$DIR/pypi_docs_upload.py" psycopg2 "$DOCDIR/html"