Add make target to automatically regenerate html fixtures

After changing something the fixtures need to be updated to reflect the new
output. This just moves those steps from my bash history to make.
This commit is contained in:
Niklas Fasching 2018-12-11 14:46:26 +01:00
parent 8cefd9fabc
commit 9826aa2143
3 changed files with 10 additions and 1 deletions

View file

@ -25,3 +25,7 @@ render:
.PHONY: generate-gh-pages .PHONY: generate-gh-pages
generate-gh-pages: build generate-gh-pages: build
./etc/generate-gh-pages ./etc/generate-gh-pages
.PHONY: generate-html-fixtures
generate-html-fixtures: build
./etc/generate-html-fixtures

5
etc/generate-html-fixtures Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
for org_file in org/testdata/*.org; do
./go-org $org_file html > org/testdata/$(basename $org_file .org).html
done

View file

@ -38,7 +38,7 @@ func main() {
default: default:
log.Fatal("Unsupported output format") log.Fatal("Unsupported output format")
} }
log.Println(out) log.Print(out)
} }
func highlightCodeBlock(source, lang string) string { func highlightCodeBlock(source, lang string) string {