Debian Codegraph @

script/generate

raw
1 #!/usr/bin/env bash
2
3 set -exuo pipefail
4
5 # Run examples.
6 go install ./cmd/addchain
7
8 for example in ./internal/examples/*; do
9 cd "${example}"
10 for script in *.sh; do
11 root="${script%.sh}"
12 bash "${script}" > "${root}.out" 2>&1
13 done
14 cd -
15 done
16
17 # go generate
18 go generate -x ./...
19
20 # Bibliography.
21 bib generate -bib doc/references.bib -type markdown -output doc/bibliography.md
22
23 # Documentation.
24 go run ./internal/tools/docgen -type readme -tocmax 3 -output README.md
25 go run ./internal/tools/docgen -type results -output doc/results.md
26 go run ./internal/tools/docgen -type gen -tocmax 3 -output doc/gen.md
27 go run ./internal/tools/docgen -type cff -output CITATION.cff
28 go run ./internal/tools/docgen -type bibtex -output CITATION.bib
29 go run ./internal/tools/docgen -type zenodo -output .zenodo.json
30
31 # Install script. (Post-processed to remove timestamp for repeatability.)
32 godownloader --repo=mmcloughlin/addchain .goreleaser.yml \
33 | sed 's/\(Code generated by godownloader\).*\(\. DO NOT EDIT\.\)/\1\2/' > install.sh
34 chmod +x install.sh