hardcoded path is now hook struct property...

This commit is contained in:
Marcell Mars 2021-03-20 23:28:33 +01:00
parent c61d9ec19b
commit 24ad682cb4
1 changed files with 8 additions and 5 deletions

View File

@ -23,14 +23,17 @@ The `sphook` binary is only tested on Linux virtual server and developer's lapto
```
If you want to build it against another directory where Hugo will render its content you should manually find the line:
```
outDir := filepath.Join("/", "var", "www", "html", "sandpoints")
hook.PublicHTMLPath = filepath.Join("/var", "www", "html", "sandpoints")
```
change it there and rebuild it.
## Two scenarios: post-commit (local) & post-receive (gitea)
`sphook` should work as it is for two scenarios:
- _bare_ git repository and in our case we run it against the `gitea` instances (git web frontend).
- Gitea keeps its `post-receive` hooks inside the `hooks/post-receive.d/` directory relative to particular _bare_ git repository. `sphook` should land there as it is, no need to change the name, and it will run after every remote `git push` into the repo.
- _working_ git repository