Patch config before release
This commit is contained in:
parent
7ca21ca524
commit
db9afe54b5
3
Makefile
3
Makefile
|
@ -45,6 +45,9 @@ watch:
|
||||||
lint:
|
lint:
|
||||||
golangci-lint run --enable-all
|
golangci-lint run --enable-all
|
||||||
|
|
||||||
|
tooling:
|
||||||
|
go get github.com/krishicks/yaml-patch/cmd/yaml-patch
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf release
|
rm -rf release
|
||||||
rm -rf data
|
rm -rf data
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- op: replace
|
||||||
|
path: /data/path
|
||||||
|
value: /var/lib/fake-smtp/data.db
|
||||||
|
- op: replace
|
||||||
|
path: /smtp/address
|
||||||
|
value: 127.0.0.1:2525
|
||||||
|
- op: replace
|
||||||
|
path: /smtp/debug
|
||||||
|
value: false
|
|
@ -75,10 +75,12 @@ function dump_default_conf {
|
||||||
local os=$2
|
local os=$2
|
||||||
local arch=$3
|
local arch=$3
|
||||||
local tmp_conf=$(mktemp)
|
local tmp_conf=$(mktemp)
|
||||||
|
local patched_conf=$(mktemp)
|
||||||
|
|
||||||
go run "$PROJECT_DIR/cmd/$command" -dump-config > "$tmp_conf"
|
go run "$PROJECT_DIR/cmd/$command" -dump-config > "$tmp_conf"
|
||||||
copy "$command" $os $arch "$tmp_conf" "$command.yml"
|
cat "$tmp_conf" | yaml-patch -o misc/release/config-patch.yml > "$patched_conf"
|
||||||
rm -f "$tmp_conf"
|
copy "$command" $os $arch "$patched_conf" "config.yml"
|
||||||
|
rm -f "$tmp_conf" "$patched_conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
function compress {
|
function compress {
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=fake-smtp
|
|
||||||
After=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/local/bin/fake-smtp -workdir /usr/local/share/fake-smtp -config /etc/fake-smtp/config.yml
|
|
||||||
Restart=on-failure
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
Loading…
Reference in New Issue