-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
30 lines (29 loc) · 925 Bytes
/
Taskfile.yaml
File metadata and controls
30 lines (29 loc) · 925 Bytes
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
version: "3"
tasks:
module-graph:refresh:
desc: Regenerate module-graph.json from go/go.mod (run after dappco.re/go/* dep bumps)
cmds:
- |
TODAY="$(date +%Y-%m-%d)" awk '
BEGIN {
print "{"
print " \"module\": \"dappco.re/go/agent\","
printf " \"generated_at\": \"%s\",\n", ENVIRON["TODAY"]
print " \"source\": \"go/go.mod\","
print " \"dependencies\": {"
}
/^[[:space:]]+dappco\.re\// {
mod=$1; ver=$2
entries[++n]=sprintf(" \"%s\": \"%s\"", mod, ver)
}
END {
for (i=1; i<=n; i++) {
sep=(i<n)?",":""
print entries[i] sep
}
print " }"
print "}"
}
' go/go.mod > module-graph.json
- jq . module-graph.json > /dev/null
- echo "module-graph.json refreshed"