2020-03-25 00:13:36 -05:00
|
|
|
before:
|
|
|
|
hooks:
|
2020-06-08 12:10:28 -05:00
|
|
|
# The build is done in this particular way to build Caddy in a designated directory named in .gitignore.
|
|
|
|
# This is so we can run goreleaser on tag without Git complaining of being dirty. The main.go in cmd/caddy directory
|
|
|
|
# cannot be built within that directory due to changes necessary for the build causing Git to be dirty, which
|
|
|
|
# subsequently causes gorleaser to refuse running.
|
|
|
|
- mkdir -p caddy-build
|
|
|
|
- cp cmd/caddy/main.go caddy-build/main.go
|
2022-02-19 17:16:11 -05:00
|
|
|
- /bin/sh -c 'cd ./caddy-build && go mod init caddy'
|
2020-03-25 00:13:36 -05:00
|
|
|
# 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
|
2020-06-08 12:10:28 -05:00
|
|
|
- go mod edit -require=github.com/caddyserver/caddy/v2@{{.Env.TAG}} ./caddy-build/go.mod
|
2021-04-01 17:07:32 -05:00
|
|
|
# as of Go 1.16, `go` commands no longer automatically change go.{mod,sum}. We now have to explicitly
|
|
|
|
# run `go mod tidy`. The `/bin/sh -c '...'` is because goreleaser can't find cd in PATH without shell invocation.
|
|
|
|
- /bin/sh -c 'cd ./caddy-build && go mod tidy'
|
2020-03-25 00:13:36 -05:00
|
|
|
- git clone --depth 1 https://github.com/caddyserver/dist caddy-dist
|
2022-09-01 22:39:18 -05:00
|
|
|
- mkdir -p caddy-dist/man
|
2020-03-25 00:13:36 -05:00
|
|
|
- go mod download
|
2022-09-01 22:39:18 -05:00
|
|
|
- go run cmd/caddy/main.go manpage --directory ./caddy-dist/man
|
|
|
|
- gzip -r ./caddy-dist/man/
|
|
|
|
- /bin/sh -c 'go run cmd/caddy/main.go completion bash > ./caddy-dist/scripts/bash-completion'
|
2020-04-26 21:20:14 -05:00
|
|
|
|
2020-03-25 00:13:36 -05:00
|
|
|
builds:
|
|
|
|
- env:
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
- GO111MODULE=on
|
|
|
|
main: main.go
|
2020-06-08 12:10:28 -05:00
|
|
|
dir: ./caddy-build
|
2020-03-25 00:13:36 -05:00
|
|
|
binary: caddy
|
|
|
|
goos:
|
|
|
|
- darwin
|
|
|
|
- linux
|
|
|
|
- windows
|
|
|
|
- freebsd
|
|
|
|
goarch:
|
|
|
|
- amd64
|
|
|
|
- arm
|
|
|
|
- arm64
|
2020-05-05 13:41:08 -05:00
|
|
|
- s390x
|
|
|
|
- ppc64le
|
2020-03-25 00:13:36 -05:00
|
|
|
goarm:
|
2022-02-19 17:16:11 -05:00
|
|
|
- "5"
|
|
|
|
- "6"
|
|
|
|
- "7"
|
2020-03-25 00:13:36 -05:00
|
|
|
ignore:
|
|
|
|
- goos: darwin
|
|
|
|
goarch: arm
|
2020-05-05 19:50:30 -05:00
|
|
|
- goos: darwin
|
|
|
|
goarch: ppc64le
|
|
|
|
- goos: darwin
|
|
|
|
goarch: s390x
|
|
|
|
- goos: windows
|
|
|
|
goarch: ppc64le
|
|
|
|
- goos: windows
|
|
|
|
goarch: s390x
|
|
|
|
- goos: freebsd
|
|
|
|
goarch: ppc64le
|
|
|
|
- goos: freebsd
|
|
|
|
goarch: s390x
|
2020-05-05 20:13:56 -05:00
|
|
|
- goos: freebsd
|
|
|
|
goarch: arm
|
2022-02-19 17:16:11 -05:00
|
|
|
goarm: "5"
|
2020-03-25 00:13:36 -05:00
|
|
|
flags:
|
|
|
|
- -trimpath
|
|
|
|
ldflags:
|
|
|
|
- -s -w
|
2020-04-26 21:20:14 -05:00
|
|
|
|
2020-03-25 00:13:36 -05:00
|
|
|
archives:
|
|
|
|
- format_overrides:
|
|
|
|
- goos: windows
|
|
|
|
format: zip
|
|
|
|
replacements:
|
2020-04-02 19:07:57 -05:00
|
|
|
darwin: mac
|
2020-03-25 00:13:36 -05:00
|
|
|
checksum:
|
|
|
|
algorithm: sha512
|
2020-04-26 21:20:14 -05:00
|
|
|
|
|
|
|
nfpms:
|
|
|
|
- id: default
|
|
|
|
package_name: caddy
|
|
|
|
|
2021-09-16 13:50:32 -05:00
|
|
|
vendor: Dyanim
|
2020-04-26 21:20:14 -05:00
|
|
|
homepage: https://caddyserver.com
|
|
|
|
maintainer: Matthew Holt <mholt@users.noreply.github.com>
|
|
|
|
description: |
|
2021-05-24 17:21:53 -05:00
|
|
|
Caddy - Powerful, enterprise-ready, open source web server with automatic HTTPS written in Go
|
2020-04-26 21:20:14 -05:00
|
|
|
license: Apache 2.0
|
|
|
|
|
|
|
|
formats:
|
|
|
|
- deb
|
|
|
|
# - rpm
|
|
|
|
|
|
|
|
bindir: /usr/bin
|
2020-12-30 09:28:20 -05:00
|
|
|
contents:
|
|
|
|
- src: ./caddy-dist/init/caddy.service
|
|
|
|
dst: /lib/systemd/system/caddy.service
|
|
|
|
|
|
|
|
- src: ./caddy-dist/init/caddy-api.service
|
|
|
|
dst: /lib/systemd/system/caddy-api.service
|
|
|
|
|
|
|
|
- src: ./caddy-dist/welcome/index.html
|
|
|
|
dst: /usr/share/caddy/index.html
|
|
|
|
|
2022-09-01 22:39:18 -05:00
|
|
|
- src: ./caddy-dist/scripts/bash-completion
|
2020-12-30 09:28:20 -05:00
|
|
|
dst: /etc/bash_completion.d/caddy
|
|
|
|
|
|
|
|
- src: ./caddy-dist/config/Caddyfile
|
|
|
|
dst: /etc/caddy/Caddyfile
|
|
|
|
type: config
|
2020-04-26 21:20:14 -05:00
|
|
|
|
2022-09-01 22:39:18 -05:00
|
|
|
- src: ./caddy-dist/man/*
|
|
|
|
dst: /usr/share/man/man8/
|
|
|
|
|
2020-04-26 21:20:14 -05:00
|
|
|
scripts:
|
|
|
|
postinstall: ./caddy-dist/scripts/postinstall.sh
|
|
|
|
preremove: ./caddy-dist/scripts/preremove.sh
|
|
|
|
postremove: ./caddy-dist/scripts/postremove.sh
|
|
|
|
|
|
|
|
|
2020-03-25 00:13:36 -05:00
|
|
|
release:
|
|
|
|
github:
|
|
|
|
owner: caddyserver
|
|
|
|
name: caddy
|
|
|
|
draft: true
|
|
|
|
prerelease: auto
|
2020-04-26 21:20:14 -05:00
|
|
|
|
2020-03-25 00:13:36 -05:00
|
|
|
changelog:
|
|
|
|
sort: asc
|
|
|
|
filters:
|
|
|
|
exclude:
|
2020-04-02 19:07:57 -05:00
|
|
|
- '^chore:'
|
2020-04-02 17:44:44 -05:00
|
|
|
- '^ci:'
|
2020-04-02 19:07:57 -05:00
|
|
|
- '^docs?:'
|
2020-07-16 16:29:06 -05:00
|
|
|
- '^readme:'
|
2020-04-04 14:29:43 -05:00
|
|
|
- '^tests?:'
|
2020-03-25 00:13:36 -05:00
|
|
|
- '^\w+\s+' # a hack to remove commit messages without colons thus don't correspond to a package
|