From 472d6e88b94d9f009a1a7fb732ec1abc3b4993fd Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 14 Jan 2017 16:36:40 +0000 Subject: [PATCH] add issue_template Former-commit-id: 78a13fa6e9505edd4e2768cb05f418594161cbb2 --- .gitignore | 1 + ISSUE_TEMPLATE | 20 ++++++++++++++++++++ filemanager.go | 3 ++- page/page.go | 5 +++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ISSUE_TEMPLATE 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