-
Notifications
You must be signed in to change notification settings - Fork 2
/
format.go
42 lines (37 loc) · 1.33 KB
/
format.go
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
package sdkbuildfile
/*
A build file is a tar.gz archive that contains metadata and artifacts
for multiple builds from multiple runtimes. This is needed when
a runtime refers to values from another file that is processed
by another runtime (for example, starlark code that calls to
js code, or yaml files).
Tree structure:
- version.txt # build file format version.
# must be the first file in the tar.
- info.json # general info, including the root path.
- runtimes/ # outputs from multiple runtimes.
- name/ # runtime name
- info.json # runtime metadata
- exports.json # exports list
- requirements.json # requirements list
- resources.json # resources list
- compiled_data/ # runtime build outputs
# data files written in sorted path order.
*/
const (
versionPrefix = "=^.^= autokitteh-build-file-v"
version = "1"
)
var filenames = struct {
exports, requirements, info, version,
resourcesDir, resourcesIndex, compiledDir,
runtimes string
}{
exports: "exports.json",
requirements: "requirements.json",
info: "info.json",
version: "version.txt",
compiledDir: "compiled",
resourcesIndex: "resources.json",
runtimes: "runtimes",
}