Skip to content

Commit 3c8433e

Browse files
authored
feat: Add packaging for apt, rpm and apk
1 parent d4d3881 commit 3c8433e

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
/bindata.go
55
/php-dump-server
66
.DS_Store
7+
/dist
8+
/goreleaser

.goreleaser.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
before:
22
hooks:
33
- go mod download
4-
- go-bindata -fs -prefix "public/" public/ public/build
54

65
builds:
76
- env:
@@ -43,3 +42,21 @@ changelog:
4342
exclude:
4443
- '^docs:'
4544
- '^test:'
45+
46+
nfpms:
47+
-
48+
package_name: php-dump-server
49+
vendor: Shyim
50+
homepage: https://github.com/shyim/php-dump-server/
51+
maintainer: Shyim <[email protected]>
52+
description: PHP Dump Server
53+
license: MIT
54+
formats:
55+
- apk
56+
- deb
57+
- rpm
58+
59+
contents:
60+
- src: php-dump-server.service
61+
dst: /etc/xdg/systemd/user/php-dump-server.service
62+
type: config

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ setup:
66
build:
77
npm run build
88
go build -ldflags="-s -w"
9+
10+
send-test-message:
11+
curl -X POST -d '{"uuid":"58db1cc5-36b2-4a8a-a493-99eadeb9bc0b","origin":{"fileName":"pd-test.php","lineNumber":23},"time":1618859193.43804,"tags":[],"payloads":[{"type":"pause"}]}' http://localhost:9009/client
12+
curl -X POST -d '{"uuid":"61cf19cd-c3bf-4228-a308-15b3e78d4101","origin":{"fileName":"pd-test.php","lineNumber":12},"time":1618859192.435765,"tags":[],"payloads":[{"type":"html","content":"<b>Html Code here</b>"}]}' http://localhost:9009/client

php-dump-server.service

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=PHP Dump Server
3+
After=network.target
4+
5+
[Service]
6+
Type=simple
7+
Restart=always
8+
ExecStart=/usr/local/bin/php-dump-server
9+
10+
[Install]
11+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)