summaryrefslogtreecommitdiff
path: root/orig/pq-web/publish.py
blob: 1915ab99f0c2acc65ee239acff7c502e0e59eeed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/python
"""Publish this game here to server"""

import subprocess, sys

manifest = [
  "*.html",
  "json2.js",
  "config.js",
  "jquery.js",
  "main.js",
  "newguy.js",
  "roster.js",
  "*.gif",
  "back.jpg",
  "dicebar.jpg",
  "close*.png",
  "touch-icon.png",
  "ipad-ad.jpg",
  "*.css"]
includes = sum(map(list, zip(["--include"] * len(manifest), manifest)), [])
destination = "progressquest.com:www/progressquest.com/play/"

print manifest
args = (
  ["rsync"] +
  sys.argv[1:] +
  [#"--dry-run",
   "--verbose",
   "--compress",
   "--checksum",
   "--recursive",
   "--partial",
   "--progress",
   #"--itemize-changes",
   "--delete",
   "--delete-excluded",
   "--times"] +
  includes +
  ["--exclude", "*",
   "./",
   destination])

print args
output = subprocess.call(args)