File: generate

package info (click to toggle)
addchain 0.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,396 kB
  • sloc: sh: 428; makefile: 8
file content (34 lines) | stat: -rwxr-xr-x 1,067 bytes parent folder | download
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
#!/usr/bin/env bash

set -exuo pipefail

# Run examples.
go install ./cmd/addchain

for example in ./internal/examples/*; do
    cd "${example}"
    for script in *.sh; do
        root="${script%.sh}"
        bash "${script}" > "${root}.out" 2>&1
    done
    cd -
done

# go generate
go generate -x ./...

# Bibliography.
bib generate -bib doc/references.bib -type markdown -output doc/bibliography.md

# Documentation.
go run ./internal/tools/docgen -type readme -tocmax 3 -output README.md
go run ./internal/tools/docgen -type results -output doc/results.md
go run ./internal/tools/docgen -type gen -tocmax 3 -output doc/gen.md
go run ./internal/tools/docgen -type cff -output CITATION.cff
go run ./internal/tools/docgen -type bibtex -output CITATION.bib
go run ./internal/tools/docgen -type zenodo -output .zenodo.json

# Install script. (Post-processed to remove timestamp for repeatability.)
godownloader --repo=mmcloughlin/addchain .goreleaser.yml \
    | sed 's/\(Code generated by godownloader\).*\(\. DO NOT EDIT\.\)/\1\2/' > install.sh
chmod +x install.sh