-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.yml
79 lines (71 loc) · 2.51 KB
/
build.yml
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
# Neon Build File (http://github.com/c4s4/neon)
doc: Build file for NeON
extends: [c4s4/build/golang.yml]
default: [clean, fmt, lint, test, bugs]
expose: [clean, fmt, lint, test, bugs, install, release]
configuration: '~/.neon/github.yml'
# GITHUB_TOKEN: 'abcdefghijklmnopqrstuvwxyz0123456789'
properties:
NAME: 'neon'
TEST_OPTS: ['-cover']
VERSION_PATH: 'github.com/c4s4/neon/neon/build.NeonVersion'
TASKS_REF: 'doc/tasks.md'
BUILTINS_REF: 'doc/builtins.md'
ARC_FILES:
=_BASE: ['README*', 'LICENSE*', 'bash_completion_neon']
'={BUILD_DIR}': ['doc/*.pdf']
targets:
bugs:
doc: "Run bug build files"
depends: [build]
steps:
- for: file
in: 'find(".", "test/bugs/*.yml")'
do:
- print: "Running build file '={file}'"
- $: ['neon', '-file', =file]
refs:
doc: "Generate reference documentation"
depends: [build]
steps:
- print: "Generating tasks reference documentation"
- $: ['={BUILD_DIR}/={NAME}', '-tasks-ref']
1>: ={TASKS_REF}
1x: true
- try:
- $: ['git', 'diff', '--quiet', '--exit-code', =TASKS_REF]
- print: 'Tasks reference documentation is up to date'
catch:
- print: "Updating tasks reference documentation"
- $: ['git', 'add', =TASKS_REF]
- $: ['git', 'commit', '-m', 'Updated tasks reference', =TASKS_REF]
- print: "Generating builtins reference documentation"
- $: ['={BUILD_DIR}/={NAME}', '-builtins-ref']
1>: ={BUILTINS_REF}
1x: true
- try:
- $: ['git', 'diff', '--quiet', '--exit-code', =BUILTINS_REF]
- print: "Builtins reference documentation is up to date"
catch:
- print: "Updating builtins reference documentation"
- $: ['git', 'add', =BUILTINS_REF]
- $: ['git', 'commit', '-m', 'Updated builtins reference', =BUILTINS_REF]
doc:
doc: "Build documentations"
steps:
- print: "Generating PDF documentation in ={BUILD_DIR}/doc"
- mkdir: '={BUILD_DIR}/doc'
- $: ['md2pdf', '-o', '={BUILD_DIR}/doc/quickstart.pdf', 'doc/quickstart.md']
- $: ['md2pdf', '-o', '={BUILD_DIR}/doc/usermanual.pdf', 'doc/usermanual.md']
- $: ['md2pdf', '-o', '={BUILD_DIR}/doc/tasks.pdf', 'doc/tasks.md']
- $: ['md2pdf', '-o', '={BUILD_DIR}/doc/builtins.pdf', 'doc/builtins.md']
archive:
doc: "Generate distribution archive"
depends: [binaries, doc]
steps:
- super:
release:
doc: "Perform a release"
depends: [version, clean, lint, test, bugs, refs, archive, deploy]
steps:
- super: