-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from FriendlyCaptcha/deb-file
Build packages for releases
- Loading branch information
Showing
10 changed files
with
101 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
goreleaser: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,7 @@ | |
# Go workspace file | ||
go.work | ||
|
||
# Goreleaser dist output files | ||
dist/ | ||
|
||
agentstate |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
HAREPLY_FILE=/etc/hareply/agentstate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=hareply | ||
After=syslog.target network-online.target | ||
|
||
[Service] | ||
EnvironmentFile=/etc/hareply/hareply.conf | ||
ExecStart=/usr/bin/hareply | ||
Restart=always | ||
Type=simple | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
systemctl --system daemon-reload || true | ||
systemctl enable hareply || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
systemctl --system daemon-reload || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
systemctl stop hareply || true | ||
systemctl disable hareply || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
project_name: hareply | ||
builds: | ||
- binary: hareply | ||
- | ||
id: hareply-build | ||
binary: hareply | ||
goos: | ||
- linux | ||
- darwin | ||
|
@@ -11,7 +13,10 @@ builds: | |
ldflags: | ||
- -s -w -X github.com/friendlycaptcha/hareply/buildinfo.version={{.Version}} -X github.com/friendlycaptcha/hareply/buildinfo.commit={{.Commit}} -X github.com/friendlycaptcha/hareply/buildinfo.commitDate={{.CommitDate}} | ||
archives: | ||
- id: hareply-archive | ||
- | ||
id: hareply-archive | ||
builds: | ||
- hareply-build | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Tag }}_ | ||
|
@@ -20,3 +25,60 @@ archives: | |
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- LICENSE | ||
- README.md | ||
nfpms: | ||
- | ||
id: hareply-package | ||
package_name: hareply | ||
builds: | ||
- hareply-build | ||
file_name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- .Tag }}_ | ||
{{- .Os }}_ | ||
{{- .Arch}} | ||
vendor: Friendly Captcha GmbH | ||
homepage: https://github.com/friendlycaptcha/hareply | ||
maintainer: Guido Zuidhof <[email protected]> | ||
description: "hareply - responder for HAProxy's agent-check" | ||
license: MIT | ||
formats: | ||
- apk | ||
- deb | ||
- rpm | ||
bindir: /usr/bin | ||
section: net | ||
priority: optional | ||
contents: | ||
- dst: /etc/hareply | ||
type: dir | ||
file_info: | ||
owner: root | ||
group: root | ||
mode: 0750 | ||
- src: assets/packages/hareply.service | ||
dst: /etc/systemd/system/hareply.service | ||
type: config | ||
file_info: | ||
owner: root | ||
group: root | ||
mode: 0640 | ||
- src: assets/packages/hareply.conf | ||
dst: /etc/hareply/hareply.conf | ||
type: config | ||
file_info: | ||
owner: root | ||
group: root | ||
mode: 0640 | ||
scripts: | ||
postinstall: "assets/packages/post-install.sh" | ||
preremove: "assets/packages/pre-uninstall.sh" | ||
postremove: "assets/packages/post-uninstall.sh" | ||
deb: | ||
lintian_overrides: | ||
- statically-linked-binary | ||
- changelog-file-missing-in-native-package | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" |