diff --git a/assets/binary.go.REMOVED.git-id b/assets/binary.go.REMOVED.git-id index 31a2c52c..0a512d2f 100644 --- a/assets/binary.go.REMOVED.git-id +++ b/assets/binary.go.REMOVED.git-id @@ -1 +1 @@ -ae9ad20ebd3ed2db145378773342920fe19a66d3 \ No newline at end of file +75755022adfcafcbf6d563ce4af52fc022e6f163 \ No newline at end of file diff --git a/binary.sh b/binary.sh deleted file mode 100644 index 02068cd8..00000000 --- a/binary.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -go get github.com/jteeuwen/go-bindata/go-bindata -go get github.com/bountylabs/gitversion -go-bindata -pkg assets -prefix "_embed" -o assets/binary.go _embed/templates/... _embed/public/js/... _embed/public/css/... _embed/public/ace/src-min/... -gitversion -s -o page/version.go -p page - -gofmt -w page/version.go -gofmt -w assets/binary.go -git add -A diff --git a/filemanager.go b/filemanager.go index ab508eae..a06bc4dc 100644 --- a/filemanager.go +++ b/filemanager.go @@ -1,3 +1,8 @@ +//go:generate go get 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/templates/... _embed/public/js/... _embed/public/css/... _embed/public/ace/src-min/... +//go:generate gitversion -s -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 // middleware. diff --git a/page/version.go b/page/version.go index 3ab63b24..ffc1b7a5 100644 --- a/page/version.go +++ b/page/version.go @@ -1,5 +1,5 @@ package page -var GIT_COMMIT_HASH = "0a2b945" +var GIT_COMMIT_HASH = "3e9ee34" var CIRCLE_BUILD_NUM = "" -var GENERATED int64 = 1490471489112984900 +var GENERATED int64 = 1490471837692753800 diff --git a/readme.md b/readme.md index 53fc8212..5c7c1171 100644 --- a/readme.md +++ b/readme.md @@ -151,3 +151,10 @@ If you want to build Caddy from source with this plugin, you should take the fol 6. Add the line `_ github.com/hacdias/caddy-filemanager` to the imports section. Now you only need to build or install Caddy and you're good to go. + +**Pre-commit Git Hook** + +``` +go generate +git add -A +```