mirror of
https://github.com/moparisthebest/arch-ppa
synced 2024-11-21 08:15:01 -05:00
webhook
This commit is contained in:
parent
08706b6b9f
commit
5c0c413371
33
src/webhook/PKGBUILD
Executable file
33
src/webhook/PKGBUILD
Executable file
@ -0,0 +1,33 @@
|
||||
# Maintainer: ava1ar <mail(at)ava1ar(dot)me>
|
||||
|
||||
pkgname=webhook
|
||||
pkgver=2.6.8
|
||||
pkgrel=1
|
||||
pkgdesc="Small server for creating HTTP endpoints (hooks)"
|
||||
arch=('i686' 'x86_64' 'arm' 'armv6' 'armv7' 'aarch64')
|
||||
license=('MIT')
|
||||
url="https://github.com/adnanh/webhook"
|
||||
makedepends=('go' 'git')
|
||||
options=('!strip' '!emptydirs')
|
||||
source=("https://github.com/adnanh/webhook/archive/${pkgver}.tar.gz" 'go.uuid.patch')
|
||||
sha1sums=('e050562130f4f101bbd7281dbe875d4493b31674'
|
||||
'1312834f40da2109cd47514a74aaf1349db918a3')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
patch -p2 < "${srcdir}/go.uuid.patch"
|
||||
GOPATH=$(pwd) go get -d -v
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
GOPATH=$(pwd) go build
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}-${pkgver}"
|
||||
|
||||
install -Dm755 "${pkgname}-${pkgver}" "${pkgdir}/usr/bin/${pkgname}"
|
||||
}
|
12
src/webhook/go.uuid.patch
Normal file
12
src/webhook/go.uuid.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- a/webhook-2.6.8/webhook.go 2018-04-24 22:46:10.468519981 -0400
|
||||
+++ b/webhook-2.6.8/webhook.go 2018-04-24 22:46:57.695524146 -0400
|
||||
@@ -202,7 +202,8 @@
|
||||
func hookHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// generate a request id for logging
|
||||
- rid := uuid.NewV4().String()[:6]
|
||||
+ u,_ := uuid.NewV4()
|
||||
+ rid := u.String()[:6]
|
||||
|
||||
log.Printf("[%s] incoming HTTP request from %s\n", rid, r.RemoteAddr)
|
||||
|
Loading…
Reference in New Issue
Block a user