-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhisho.ron
165 lines (165 loc) · 3.73 KB
/
hisho.ron
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
Project(
name: "hisho",
environments: [
Environment(
name: "parent",
system: ["HOME"],
// sources are files, values from files are overwritten by the values defined in here
sources: ["hisho-parent.env"],
// values, these override any variables from sources or inherits
values: {
"FOURTH": "4",
"FIFTH": "5",
"OVERRIDE_BY_VALUES": "yes",
}
),
Environment(
name: "child",
// inherit gets all values from the parents, last parent has precedence
inherits: ["parent"],
// sources are files, values override parent values
sources: ["hisho-child.env"],
// values, again override any prior variables
values: {
"NINETH": "9",
"TENTH": "10",
"OVERRIDE_BY_CHILD_VALUES": "yes",
},
),
Environment(
name: "test",
// inherit gets all values from the parents, last parent has precedence
inherits: ["child"],
// values, again override any prior variables
values: {
"run_command": "test"
},
),
],
build: [
BuildStep(
name: "cargo-version",
shell: [
Process(
command: "cargo",
args: ["--version"]
)
],
),
BuildStep(
name: "render-template",
shell: [
Process(
command: "echo",
args: [
"job", "'{{build.name}}'", "git", "branch='{{git.branch}}'", "sha='{{git.commit_sha_short}}'",
"'{{git.commit_author_name}}'", "'{{git.commit_author_email}}'", "'{{git.commit_date}}'",
"Home: {{env.HOME}}"
]
)
],
input_files: ["src/*.rs"]
),
BuildStep(
name: "debug",
shell: [
Process(
command: "cargo",
args: ["build"]
)
],
depends_on: ["cargo-version"]
),
BuildStep(
name: "release",
shell: [
Process(
command: "cargo",
args: ["build", "--release"]
)
],
),
],
services: [
Service(
name: "cloudflare",
protocol: HTTP,
uri: "https://cloudflare.com"
),
],
commands: [
Command(
name: "exec",
shell: [
Process(
command: "echo",
args: ["[[argv]]"],
),
],
),
Command(
name: "list-src",
shell: [
Process(
command: "ls",
args: ["-l"],
cwd: "./hisho_core/src"
),
Process(
command: "ls",
args: ["-l"],
cwd: "./hisho_cli2/src"
),
],
),
Command(
name: "run",
shell: [
Process(
command: "target/x86_64-unknown-linux-musl/debug/hisho_cli2",
args: ["run", "echo-env"]
),
],
depends_on_build: ["debug"]
),
Command(
name: "echo-env",
shell: [
Process(
command: "bash",
args: ["./hisho-env.sh"],
),
],
environment: "child",
),
Command(
name: "build",
depends_on_build: ["release"]
),
Command(
name: "test",
environment: "child",
depends_on_build: ["render-template"]
),
Command(
name: "test-build",
shell: [
Process(
command: "target/x86_64-unknown-linux-musl/debug/hisho_cli2",
args: ["run", "{{env.run_command}}"]
),
],
environment: "test",
depends_on_build: ["debug"]
),
Command(
name: "push",
shell: [
Process(command: "git", args: ["push"]),
Process(command: "git", args: ["push", "--tags"]),
Process(command: "git", args: ["push", "tabbygit"]),
Process(command: "git", args: ["push", "tabbygit", "--tags"]),
]
),
]
)