-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.hlb
121 lines (107 loc) · 2.22 KB
/
build.hlb
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
fs npm() {
image "alpine"
run "apk add --update npm"
}
fs vsce() {
npm
run "npm install -g vsce"
}
fs npmInstall(fs src) {
npm
run "npm install" with option {
dir "/src"
mount src "/src" with option {
readonly
}
mount scratch "/src/node_modules" as nodeModules
}
}
fs packageBuilder(fs src) {
vsce
run "vsce package -o /package" with option {
dir "/src"
mount src "/src" with option {
readonly
}
mount fs { nodeModules src; } "/src/node_modules"
mount scratch "/src/out"
mount scratch "/package" as package
}
}
fs publish(fs src) {
vsce
run "vsce publish --packagePath /package/* -p $(cat /.token)" with option {
dir "/src"
mount src "/src" with option {
readonly
}
mount fs { nodeModules src; } "/src/node_modules"
mount fs { package src; } "/package"
secret ".token" "/.token"
}
}
fs _bumpVersion() {
npm
run "npm version patch" with option {
dir "/src"
mount fs {
local "." with option {
includePatterns "package.json"
}
} "/src" as versionOutput
}
}
fs _generateLock(fs packageSource) {
npm
run "npm install" with option {
dir "/src"
mount packageSource "/src" as lockOutput
mount scratch "/src/node_modules"
}
}
fs source() {
git "https://github.com/openllb/hlb.vscode.git" "master" with option {
keepGitDir
}
mkdir "syntaxes" 0o755
copy fs {
git "https://github.com/openllb/hlb.git" "master"
} "/language/hlb.tmbundle/Syntaxes/hlb.tmLanguage" "syntaxes/."
mkdir "node_modules" 0o755
mkdir "out" 0o755
}
fs localSource() {
local "." with option {
includePatterns "LICENSE" "*.json" "src"
}
mkdir "syntaxes" 0o755
copy fs {
local "/Users/cbennett/gosrc/hlb/src/github.com/openllb/hlb/language/hlb.tmbundle/Syntaxes" with option {
includePatterns "*.tmLanguage"
}
} "." "syntaxes/."
mkdir "node_modules" 0o755
mkdir "out" 0o755
}
fs localPackage() {
local "." with option {
includePatterns "package.json"
}
}
fs updateLock() {
lockOutput localPackage
download "."
}
fs devPackage() {
package localSource
download "."
}
fs default() {
publish source
}
# release is called to update local version and update dependencies.
# after this is called, call default to publish release
fs release() {
lockOutput versionOutput
download "."
}