This repository has been archived by the owner on Nov 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathSConstruct
117 lines (94 loc) · 2.95 KB
/
SConstruct
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
###############################################################################
##
## Copyright (C) 2012-2015 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
###############################################################################
SVG_FILES = [
## Spec Figures
##
'appcode.svg',
'sessions.svg',
'sessions2.svg',
'sessions3.svg',
'sessions4.svg',
'hello.svg',
'hello_denied.svg',
'hello_authenticated.svg',
'goodbye.svg',
'pubsub_publish1.svg',
'pubsub_publish2.svg',
'pubsub_subscribe1.svg',
'pubsub_subscribe2.svg',
'rpc_call1.svg',
'rpc_call2.svg',
'rpc_cancel1.svg',
'rpc_cancel2.svg',
'rpc_progress1.svg',
'rpc_register1.svg',
'rpc_register2.svg',
## Unified Routing
##
'unified_routing_broker_dealer.svg',
'unified_routing_pubsub_broker.svg',
'unified_routing_rpc_client_server.svg',
'unified_routing_rpc_dealer.svg',
'unified_routing_wamp_iot.svg',
## WAMP logos
##
'wamp_logo.svg',
# 'wamp_logo_tiny.svg',
# 'wamp_logo_tiny_white.svg',
# 'li_edge.svg',
## Misc
##
'3rd_party_logos/record-evolution.svg',
'3rd_party_logos/computer-associates.svg',
'3rd_party_logos/tavendo.svg',
'3rd_party_logos/kitware.svg',
'3rd_party_logos/logo_genesi_wampws_site.svg',
'3rd_party_logos/mds_lab_messina.svg'
]
IMG_SOURCE_DIR = "visuals/wamp2"
IMG_GEN_DIR = "website/wampws/static/img/gen"
# Directory to be uploaded to Amazon S3 bucket
UPLOAD_DIR = 'website/wampws/build'
# Contains fingerprints of uploaded files
UPLOADED_DIR = 'website/wampws/build_uploaded'
# The Tavendo Amazon S3 Bucket to upload to
BUCKET = 'wamp-proto.org'
# The Bucket Prefix to upload files to
BUCKET_PREFIX = ''
###
### Do not touch below this unless you know what you are doing;)
###
import os
import pkg_resources
taschenmesser = pkg_resources.resource_filename('taschenmesser', '..')
## use this for Taschenmesser development only
#taschenmesser = "../../infrequent/taschenmesser"
#taschenmesser = "../../../taschenmesser"
env = Environment(tools = ['default', 'taschenmesser'],
toolpath = [taschenmesser],
ENV = os.environ)
# Process SVGs
#
imgs = env.process_svg(SVG_FILES, IMG_SOURCE_DIR, IMG_GEN_DIR)
Alias("img", imgs)
# Upload to Amazon S3
#
uploaded = env.s3_dir_uploader(UPLOADED_DIR, UPLOAD_DIR, BUCKET, BUCKET_PREFIX)
Depends(uploaded, imgs)
Clean(uploaded, UPLOADED_DIR)
Alias("upload", uploaded)