-
Notifications
You must be signed in to change notification settings - Fork 15
/
BUILD
33 lines (32 loc) · 1.04 KB
/
BUILD
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
genrule(
name = "readme",
outs = ["README.md"],
tools = ["//src/java/com/github/jsdossier:GenerateReadme"],
executable = 0,
cmd = "$(location //src/java/com/github/jsdossier:GenerateReadme) $@",
)
genrule(
name = "release",
srcs = [
"LICENSE",
"CHANGES.md",
"package.json",
":readme",
"//src/java/com/github/jsdossier:dossier_deploy.jar",
],
outs = [
"js-dossier.tar.gz",
],
cmd = 'readonly GENFILE="$$(pwd)/$@"; ' +
'readonly OUT="$$(mktemp -d $${TMPDIR:-/tmp}/dossier.XXXXXX)/js-dossier"; ' +
'mkdir -p $$OUT && ' +
'cp $(location :readme) $$OUT/ && ' +
'cp $(location package.json) $$OUT/ && ' +
'cp $(location //:LICENSE) $$OUT/ && ' +
'cp $(location //:CHANGES.md) $$OUT/ && ' +
'cp $(location //src/java/com/github/jsdossier:dossier_deploy.jar) $$OUT/dossier.jar && ' +
'chmod a-x $$OUT/* && ' +
'cd $$(dirname $$OUT) && ' +
'tar -zcvf $$GENFILE js-dossier/ && ' +
'cd $$(dirname $$GENFILE) && rm -rf $$OUT/',
)