mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53:48 +03:00
chore: simplify goreleaser flow, add bash completions to .deb (#3436)
This commit is contained in:
parent
0cbf467b3f
commit
7a365af5df
1 changed files with 5 additions and 6 deletions
|
@ -1,12 +1,10 @@
|
||||||
before:
|
before:
|
||||||
hooks:
|
hooks:
|
||||||
- mkdir -p caddy-build
|
- cp ./go.mod ./cmd/caddy/go.mod
|
||||||
- cp cmd/caddy/main.go caddy-build/main.go
|
- sed -i.bkp 's|github.com/caddyserver/caddy/v2|caddy|g' ./cmd/caddy/go.mod
|
||||||
- cp ./go.mod caddy-build/go.mod
|
|
||||||
- sed -i.bkp 's|github.com/caddyserver/caddy/v2|caddy|g' ./caddy-build/go.mod
|
|
||||||
# GoReleaser doesn't seem to offer {{.Tag}} at this stage, so we have to embed it into the env
|
# 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
|
# 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
|
- git clone --depth 1 https://github.com/caddyserver/dist caddy-dist
|
||||||
- go mod download
|
- go mod download
|
||||||
|
|
||||||
|
@ -15,7 +13,7 @@ builds:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
- GO111MODULE=on
|
- GO111MODULE=on
|
||||||
main: main.go
|
main: main.go
|
||||||
dir: ./caddy-build
|
dir: ./cmd/caddy
|
||||||
binary: caddy
|
binary: caddy
|
||||||
goos:
|
goos:
|
||||||
- darwin
|
- darwin
|
||||||
|
@ -84,6 +82,7 @@ nfpms:
|
||||||
./caddy-dist/init/caddy.service: /lib/systemd/system/caddy.service
|
./caddy-dist/init/caddy.service: /lib/systemd/system/caddy.service
|
||||||
./caddy-dist/init/caddy-api.service: /lib/systemd/system/caddy-api.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/welcome/index.html: /usr/share/caddy/index.html
|
||||||
|
./caddy-dist/scripts/completions/bash-completion: /etc/bash_completion.d/caddy
|
||||||
config_files:
|
config_files:
|
||||||
./caddy-dist/config/Caddyfile: /etc/caddy/Caddyfile
|
./caddy-dist/config/Caddyfile: /etc/caddy/Caddyfile
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue