-
Notifications
You must be signed in to change notification settings - Fork 1
/
Auto
executable file
·77 lines (58 loc) · 1.63 KB
/
Auto
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
set -o nounset
# Setup:
# - Single source repo for webpipe/latch, for convenience, code sharing, etc.
# - Two different basis packages? Or one.
# - A single package can expose two executables: webpipe and latch.
# - And the webpipe.R library.
# - A single set of documentation? If it is versioned, that doesn't really
# make that much sense. But for now we won't bother versioning it.
readonly THIS_DIR=$(readlink -f $(dirname $0))
export PYTHONPATH=$THIS_DIR:~/hg/tnet/python:~/hg/json-template/python
# Now do the data directory, but make sure to only get the stuff we want. Not
# examples, testdata, .swp files, etc.
plugins-manifest() {
# sh: including _bin/render-tar.sh now
find plugins \
-name render -o \
-name \*.sh -o \
-name \*.js -o \
-name \*.css -o \
-name \*.html
}
manifest() {
# TODO: create a versioning scheme. We are just using this for the build
# stamp (timestamp, host)
local version=prerelease
basisc echo-stamp webpipe $version > _tmp/Package.stamp
echo _tmp/Package.stamp Package.stamp
# TODO: Use deps in _tmp
# TODO: build basis package
# TODO: add publish.py
py-deps webpipe.serve webpipe.xrender
ls webpipe/*.html webpipe.R wp.sh
# docs are used for help
ls doc/wp-help*.txt
plugins-manifest
}
Build() {
manifest | multi tar _tmp/webpipe.tar.gz
}
run-py-tests() {
local dir=$1
ls $dir/*_test.py | awk '{ print "./" $0 }' | sh -x -e
}
Test() {
set -o errexit
run-py-tests webpipe
run-py-tests common
run-py-tests latch
echo PASS
}
# TODO:
# - usage-address.txt should be set
Deploy() {
# copy basis package somewhere?
echo
}
"$@"