-
Notifications
You must be signed in to change notification settings - Fork 6
/
SConstruct
57 lines (47 loc) · 1.37 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
# Copyright (C) 2019 Leandro Lisboa Penz <lpenz@lpenz.org>
# This file is subject to the terms and conditions defined in
# file 'LICENSE', which is part of this source code package.
import os
pjoin = os.path.join
if False:
Environment = None
env = Environment(ENV=os.environ)
env["ENV"]["GO111MODULE"] = "off"
env.Command("_apt-mirrors.json", ["apt-mirrors-info"], "./$SOURCE $TARGET")
env.Command(
"_github-branches.json", ["github-branch-workflow-run"], "./$SOURCE $TARGET"
)
def jsonRender(target, source, jsons):
env.Command(
target,
source,
" ".join(
["./json-tmpl-render"]
+ ["--json " + j for j in jsons]
+ ["$SOURCE", "$TARGET"]
),
)
env.Depends(target, jsons)
env.Depends(target, ["json-tmpl-render"])
jsonRender(
"index.md", "index.md.tmpl", jsons=["_apt-mirrors.json", "_github-branches.json"]
)
jsonRender(
"git-update-image-branches",
"git-update-image-branches.tmpl",
jsons=["_apt-mirrors.json"],
)
for gobase in [
"apt-mirrors-info",
"bring-random-branch",
"dockerhub-set-descriptions",
"docker-manifest-set-arch",
"github-branch-workflow-run",
"json-tmpl-render",
"spurious-branches",
]:
env.Command(
gobase,
[pjoin("go/cmd", gobase, "main.go"), "go/common/common.go"],
"go build " + pjoin("./go/cmd", gobase),
)