caddy: Caddy doesn't show its version in CLI (FreeBSD 13.1, ports)
Just updated Caddy on FreeBSD 13.1 from 2.6.0 to 2.6.1 via ports, and when I execute caddy version it shows blank line:
~$ caddy version
~$
Otherwise, everything seems to work fine.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
You are correct that portsnap is just an update tool.
FreeBSD is unable to use xcaddy to build caddy. Our infrastructure requires that all packages are fetched in advance, so we fetch the release tarball from github and all dependent go modules and build them with
go build.I would love to use xcaddy so that users could properly customize their build, but it simply wouldn’t work: external network access is disabled in our package builders once the build process has begun.
I see two possible solutions:
If there is a
-ldflags='-X version=...'build flag I could use to set the version, I could at least wedge a version string in there. It’s not immediately apparent to me what that flag would be.If I could pre-fetch all the modules that xcaddy needs, have them in place before xcaddy runs, and have xcaddy use them instead of fetching anything externally, it might be possible to get a proper xcaddy build working.