summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Al Sahaf <msaa1990@gmail.com>2020-05-22 22:13:31 +0300
committerGitHub <noreply@github.com>2020-05-22 15:13:31 -0400
commit7a365af5df3fd6fec2e1e9013e493fa7769260ce (patch)
tree26a6399fd1b1ebe931a22cda9705db92e3403ede
parent0cbf467b3fbde471e5ee67680fb98a9af2a9b16e (diff)
chore: simplify goreleaser flow, add bash completions to .deb (#3436)
-rw-r--r--.goreleaser.yml11
1 files changed, 5 insertions, 6 deletions
diff --git a/.goreleaser.yml b/.goreleaser.yml
index e662799..325baf2 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -1,12 +1,10 @@
before:
hooks:
- - mkdir -p caddy-build
- - cp cmd/caddy/main.go caddy-build/main.go
- - cp ./go.mod caddy-build/go.mod
- - sed -i.bkp 's|github.com/caddyserver/caddy/v2|caddy|g' ./caddy-build/go.mod
+ - cp ./go.mod ./cmd/caddy/go.mod
+ - sed -i.bkp 's|github.com/caddyserver/caddy/v2|caddy|g' ./cmd/caddy/go.mod
# GoReleaser doesn't seem to offer {{.Tag}} at this stage, so we have to embed it into the env
# so we run: TAG=$(git describe --abbrev=0) goreleaser release --rm-dist --skip-publish --skip-validate
- - go mod edit -require=github.com/caddyserver/caddy/v2@{{.Env.TAG}} ./caddy-build/go.mod
+ - go mod edit -require=github.com/caddyserver/caddy/v2@{{.Env.TAG}} ./cmd/caddy/go.mod
- git clone --depth 1 https://github.com/caddyserver/dist caddy-dist
- go mod download
@@ -15,7 +13,7 @@ builds:
- CGO_ENABLED=0
- GO111MODULE=on
main: main.go
- dir: ./caddy-build
+ dir: ./cmd/caddy
binary: caddy
goos:
- darwin
@@ -84,6 +82,7 @@ nfpms:
./caddy-dist/init/caddy.service: /lib/systemd/system/caddy.service
./caddy-dist/init/caddy-api.service: /lib/systemd/system/caddy-api.service
./caddy-dist/welcome/index.html: /usr/share/caddy/index.html
+ ./caddy-dist/scripts/completions/bash-completion: /etc/bash_completion.d/caddy
config_files:
./caddy-dist/config/Caddyfile: /etc/caddy/Caddyfile