Added Binaries
This commit is contained in:
parent
7c189010fe
commit
91eaacc556
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,12 +1,12 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/go-ini/ini"
|
"github.com/go-ini/ini"
|
||||||
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"io/ioutil"
|
|
||||||
"encoding/json"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
||||||
|
@ -62,7 +62,7 @@ func handleHook(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Println("Recived payload, Secret:", hook_data.Secret, ", Ref:", hook_data.Ref)
|
log.Println("Recived payload, Secret:", hook_data.Secret, ", Ref:", hook_data.Ref)
|
||||||
|
|
||||||
if hook_data.Secret == config("secret") {
|
if hook_data.Secret == config("secret") {
|
||||||
if hook_data.Ref == config("branch_name") || hook_data.Ref == "refs/heads/" + config("secret") {
|
if hook_data.Ref == config("branch_name") || hook_data.Ref == "refs/heads/"+config("secret") {
|
||||||
log.Println("Recived corresponding secret: ", hook_data.Secret)
|
log.Println("Recived corresponding secret: ", hook_data.Secret)
|
||||||
log.Println("Starting update...")
|
log.Println("Starting update...")
|
||||||
cmd, err := exec.Command("/bin/bash", "deploy.sh", "-k", config("ssh_key"), "-g", config("git_url"), "-d", config("deploy_dir"), "-c", config("container_name")).Output()
|
cmd, err := exec.Command("/bin/bash", "deploy.sh", "-k", config("ssh_key"), "-g", config("git_url"), "-d", config("deploy_dir"), "-c", config("container_name")).Output()
|
||||||
|
|
Loading…
Reference in New Issue