/
build.yml
51 lines (44 loc) · 1.25 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
# NeON build file (http://github.com/c4s4/neon)
extends: [golang, git, changelog]
properties:
WEB_HOME: 'casa@sweetohm.net:/home/web/dist/={NAME}'
LIBRARIES: [github.com/joho/godotenv]
environment:
GOPATH: '${GOPATH}:={_BASE}'
targets:
test:
doc: Run an integration test
depends: bin
steps:
# test without -env option
- write: '={BUILD_DIR}/test'
text: "#!/bin/sh\necho $FOO\necho $SPAM"
- chmod: '={BUILD_DIR}/test'
mode: 0755
- $: ['={BUILD_DIR}/dotrun', '={BUILD_DIR}/test']
1=: output
1x: true
- if: 'output != "BAR\nEGGS"'
then:
- throw: "Test failed:\n={output}"
# test with -env option
- $: ['={BUILD_DIR}/dotrun', '-env', '.env2', '={BUILD_DIR}/test']
1=: output
1x: true
- if: 'output != "FOO\nSPAM"'
then:
- throw: "Test failed:\n={output}"
- print: 'Test OK'
deploy:
doc: Deploy installation script and binaries
depends: binaries
steps:
- print: 'Deploying dotrun binaries...'
- $: ['scp', 'install', =WEB_HOME]
- 'binaries = join(find(".", BUILD_DIR+"/bin/*"), " ")'
- $: 'scp ={binaries} ={WEB_HOME}'
release:
doc: Perform a release
depends: [test, version, archive, deploy]
steps:
- super: