...
1fs default() {
2 gofmt fs { chromaLexer "pygments.lexers.hlb.HlbLexer"; }
3}
4
5fs script() {
6 local "." with option {
7 includePatterns "pygments2chroma.py"
8 }
9}
10
11fs runChromaPython(string package) {
12 image "python:alpine" with option { resolve; }
13 run "apk add -U git"
14 run "pip install -U pystache"
15 run "pip install -U -e git+https://github.com/hinshun/pygments.git@hlb-lexer#egg=pygments"
16 run string { format "python pygments2chroma.py %s > /out/lexer.go" package; } with option {
17 dir "/chroma"
18 mount script "/chroma"
19 mount fs { scratch; } "/out" as chromaLexer
20 }
21}
22
23fs runGoFormat(fs goFiles) {
24 image "golang:alpine" with option { resolve; }
25 run "gofmt -s -w /gofmt/*.go" with option {
26 dir "/gofmt"
27 mount goFiles "/gofmt" as gofmt
28 }
29}
View as plain text