diff --git a/.gitignore b/.gitignore index 663ae654..4dc092e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ binary.go debug +version.go diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE new file mode 100644 index 00000000..94c2e5b4 --- /dev/null +++ b/ISSUE_TEMPLATE @@ -0,0 +1,20 @@ +(Are you asking for help with using Caddy or File Manager? Please use our forum instead: https://forum.caddyserver.com. If you are filing a bug report, please answer the following questions. If your issue is not a bug report, you do not need to use this template.) + +### 1. Which revision of File Manager are you running (check the footer on any page)? + + +### 2. What are you trying to do? + + +### 3. What is your entire Caddyfile? +```text +(Put Caddyfile here) +``` + +### 4. What did you expect to see? + + +### 5. What did you see instead (give full error messages and/or log)? + + +### 6. How can someone who is starting from scratch reproduce this behavior as minimally as possible? diff --git a/filemanager.go b/filemanager.go index a96caf8e..b0260743 100644 --- a/filemanager.go +++ b/filemanager.go @@ -1,6 +1,7 @@ //go:generate go get github.com/jteeuwen/go-bindata -//go:generate go install github.com/jteeuwen/go-bindata/go-bindata +//go:generate go get github.com/bountylabs/gitversion //go:generate go-bindata -pkg assets -prefix "_embed" -o assets/binary.go _embed/... +//go:generate gitversion -o page/version.go -p page // Package filemanager provides middleware for managing files in a directory // when directory path is requested instead of a specific file. Based on browse diff --git a/page/page.go b/page/page.go index 54f80fda..65ac2908 100644 --- a/page/page.go +++ b/page/page.go @@ -34,6 +34,11 @@ type Info struct { Token string } +// Commit returns the current build commit +func (i *Info) Commit() string { + return GIT_COMMIT_HASH +} + // BreadcrumbMapItem ... type BreadcrumbMapItem struct { Name string