chore(): add installation script

This commit is contained in:
Nicolas Carlier 2018-01-02 16:57:27 +00:00
parent e6b02069e7
commit 4b3c0c1bdb
2 changed files with 18 additions and 14 deletions

View File

@ -7,25 +7,21 @@ A very simple webhook server to launch shell scripts.
## Installation
### Using the binary
Run the following command:
Linux binaries for release [1.0.0](https://github.com/ncarlier/webhookd/releases)
* [amd64](https://github.com/ncarlier/webhookd/releases/download/v1.0.0/webhookd-linux-amd64-v1.0.0.tar.gz)
Download the version you need, untar, and install to your PATH.
```
$ wget https://github.com/ncarlier/webhookd/releases/download/v1.0.0/webhookd-linux-amd64-v1.0.0.tar.gz
$ tar xvzf webhookd-linux-amd64-v1.0.0.tar.gz
$ ./webhookd
```bash
$ go get -v github.com/ncarlier/webhookd/webhookd
```
### Using Docker
Start the container mounting your scripts directory:
**Or** download the binary regarding your architecture:
```bash
$ sudo curl -s https://raw.githubusercontent.com/ncarlier/webhookd/master/install.sh | sh
```
**Or** use Docker:
```bash
$ docker run -d --name=webhookd \
--env-file .env \
-v ${PWD}/scripts:/var/opt/webhookd/scripts \

8
install.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
release_url="https://api.github.com/repos/ncarlier/webhookd/releases/latest"
download_url=`curl -s $release_url | grep browser_download_url | head -n 1 | cut -d '"' -f 4`
sudo curl -o /usr/local/bin/webhookd -L $download_url
sudo chmod +x /usr/local/bin/webhookd