Skip to content

Commit d162a30

Browse files
hacdiasgitbook-bot
authored andcommittedJan 1, 2019
GitBook: [master] 2 pages modified
1 parent 58dfc86 commit d162a30

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
 

‎configuration/command-runner.md

+24
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
# Command Runner
22

3+
The command runner is a feature that enables you to execute any shell command you want before or after a certain event. Right now, these are the events:
4+
5+
* Copy
6+
* Rename
7+
* Upload
8+
* Delete
9+
10+
Also, during the execution of the commands set for those hooks, there will be some environment variables available to help you perform your commands:
11+
12+
* `FILE` with the full absolute path to the changed file.
13+
* `SCOPE` with the path to user's scope.
14+
* `USERNAME` with the user's username.
15+
* `DESTINATION` with the absolute path to the destination. Only used for **copy** and **rename.**
16+
17+
At this moment, you can edit the commands via the command line interface, using the following commands \(please check the flag `--help` to know more about them\):
18+
19+
```bash
20+
filebrowser cmds add -e="before_copy" -c="echo $FILE"
21+
filebrowser cmd rm -e="before_copy" -i 0
22+
filebrowser cmds ls
23+
```
24+
25+
Or you can use the web interface to manage them via **Settings****Global Settings**.
26+

‎contributing/ci-and-releases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We use semantic versioning. For more info check [semver.org](https://semver.org)
1717
5. Revert the version to `untracked` and commit again.
1818
3. When the tag is pushed, Travis will detect it and execute the following [procedures](https://github.com/filebrowser/filebrowser/blob/master/.travis.yml):
1919
1. Run through the linters to check if the code is alright.
20-
2. Build the frontend and the backend, generating `rice-box.go`\`.
20+
2. Build the frontend and the backend, generating `rice-box.go`.
2121
* If the commit **is not** tagged, we will push the latest `filebrowser/filebrowser` docker image to [hub.docker.com/r/filebrowser/filebrowser](https://hub.docker.com/r/filebrowser/filebrowser/).
2222
3. If the commit **is** tagged, then:
2323
1. Build the release artifacts for all supported platforms and a new docker image \(see [`.goreleaser.yml`](https://github.com/filebrowser/filebrowser/blob/master/.goreleaser.yml) for more information\).

0 commit comments

Comments
 (0)
Failed to load comments.