cmd: Add `xcaddy version` command

This issue has been created since 2021-08-27.

Fix #22

It's not really useful to get Caddy's version when in dev mode anyways, and you can get full version information with xcaddy list-modules --versions if you really need to... so "hiding" caddy version in dev mode to show xcaddy's version instead seems totally fine.

I moved the main.go up a dir to match how Caddy does it for grabbing version information via having a level of indirection.

Sorry about the diff, git hates moving files when they have the same name. Please look at the first commit e6f588a on its own to see the actual new code for grabbing the version.

francislavoie wrote this answer on 2021-08-27

@mohammed90 I think we need to port this stuff https://github.com/caddyserver/caddy/blob/master/.goreleaser.yml#L7 into this repo as well to make sure the version's embedded, right?

Edit: Done

francislavoie wrote this answer on 2021-08-27

So, I think this PR should actually not be squashed, because I think that would make git blame get clobbered because of files being moved around. Probably best to ff-merge this instead.

More Details About Repo
Owner Name caddyserver
Repo Name xcaddy
Full Name caddyserver/xcaddy
Language Go
Created Date 2020-03-21
Updated Date 2022-09-22
Star Count 381
Watcher Count 14
Fork Count 72
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
plot methods for perf and tune to use ggplot2 2 2020-12-16 2022-09-21
More informative error message for any(is.na(Y)) with DA analyses 0 2020-12-14 2022-08-17
wrong url "correction" 0 2020-12-19 2022-08-17
Failed to import for js-sha3, on esm.sh v58 2 2021-11-25 2022-07-22
Ordering of static_ips in state causes unnecessary changes in plan 3 2022-05-02 2022-08-28
Add support multiple docker repos without publish additional ports 4 2022-06-03 2022-08-29
Run code coverage in CI 0 2021-05-19 2022-08-29
Combines self-unload + Auger wagon[Question] 4 2022-04-16 2022-08-27
[QUESTION] How to perform a nested SQL string query via Execute? 2 2021-07-08 2022-09-28
init-candidate fail in Ropsten 1 2021-09-06 2022-09-22
Missing local setup instructions step 3 2022-06-08 2022-09-07
can't make hidden tab group folder on POSIX-based OSs 0 2022-02-21 2022-08-20
Scatter Items seem to go wildly outside their path 1 2021-01-28 2022-09-19
How do i draw a string in cosmos graphic? 1 2022-01-28 2022-09-02
[Bug] workflowBundle with code/sourceMap breaks with obscure error, while using codePath/sourceMapPath works 2 2022-07-16 2022-09-18
Lock the Jellyfin JSO version 0 2022-05-03 2022-09-18
CentOS Stream: No ALSA devices detected 3 2021-10-09 2022-09-28
ios 接收到自定义消息 但不能触发消息发送 报 | 请设置有效的触发推送方式 2 2019-05-20 2022-09-22
Xbox Series X Controller not working 1 2021-07-11 2022-09-21
Feature: Add flag for showing sizes as bytes 4 2022-05-31 2022-09-02
Release script: Action required 0 2021-07-01 2022-07-02
Training with 4 GPU 0 2021-01-09 2022-01-16
Illegal instruction (core dumped) 3 2021-01-07 2022-09-21
Content type not supported using html documentation page 0 2021-08-23 2022-08-26
Wrong messages format using smtp client 0 2021-08-12 2022-08-19
[APIM-3.2.0][Document][Markdown]-Markdown styling is not getting rendered in the publisher portal 0 2021-10-04 2022-09-09
Update repository for iOS 14.5 / macOS 11.3 0 2021-05-03 2022-09-21
CustomResource support for GitOps 0 2022-07-21 2022-08-26
Bumping Java software version 0 2021-09-23 2022-07-24
Potential database connections leaks from pool with .transactional_push! 3 2022-06-11 2022-08-18
Unexpected behaviour of showErrorDetails = false 7 2022-03-17 2022-09-13
[Bug]: The collection load failed before the collection's data was inserted! 6 2022-03-17 2022-08-20
Fix incorrect GPIO for M5Stack Camera Pixel Data Bit 0. 3 2021-11-12 2022-09-17
Can't see configuration page, all is in blank 0 2022-09-16 2022-09-26
MenuModel property for visibility like in Vue 1 2022-08-21 2022-09-23
Secureboost bug 3 2021-11-20 2021-12-26
英特尔 Wireless-AC 9462 wifi 经常断开 2 2021-06-01 2022-09-25
No install path specified, looking for default installation registry key 0 2022-08-19 2022-09-18
OutOfMemoryError: Physical memory usage is too high: physicalBytes (5300M) > maxPhysicalBytes (5300M) 23 2021-03-16 2022-09-26
We need suport for OSGi and Equinox 3 2021-11-04 2022-09-25
If the a key with the given keyId cannot be found in Key Protect it should fail the Secret generation 0 2020-08-28 2022-09-23
Move torchbench workflow to `workflow_dispatch`? 0 2022-03-16 2022-09-13
报错:NameError: name 'x2paddle_output' is not defined 5 2022-06-11 2022-09-24
Verify resolved dependencies use locked version 1 2020-11-09 2022-09-18
Android Matrix是不是不支持收集崩溃错误? 1 2022-04-16 2022-09-24
Allow to pass terminus options 2 2022-04-19 2022-07-22
The Reverse proxy nginx log 'connection reset by peer' when middleware return 401 for token expired reason, and return directly not to read http body in the post request 5 2021-11-12 2022-09-20
Calling Strategy.fail with 2 arguments is misinterpreted by the compiler 8 2022-08-03 2022-09-18
SqlServer Migrations: Rebuild primary keys when column narrowed 1 2019-07-26 2022-09-13
After upgrade to v12.2.5 and removal of node-sass ng test fails 2 2021-09-14 2022-09-28