Add git ref documentation (#88)

Closes #87
This commit is contained in:
Silas Rech 2022-03-25 19:24:30 +01:00 committed by GitHub
parent 996c8d9d08
commit 0b7d07c7a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,12 @@ $ xcaddy build [<caddy_version>]
[--with <module[@version][=replacement]>...] [--with <module[@version][=replacement]>...]
``` ```
- `<caddy_version>` is the core Caddy version to build; defaults to `CADDY_VERSION` env variable or latest. - `<caddy_version>` is the core Caddy version to build; defaults to `CADDY_VERSION` env variable or latest.<br>
This can be the keyword `latest`, which will use the latest stable tag, or any git ref such as:
- A tag like `v2.0.1`
- A branch like `master`
- A commit like `a58f240d3ecbb59285303746406cab50217f8d24`
- `--output` changes the output file. - `--output` changes the output file.
- `--with` can be used multiple times to add plugins by specifying the Go module name and optionally its version, similar to `go get`. Module name is required, but specific version and/or local replacement are optional. - `--with` can be used multiple times to add plugins by specifying the Go module name and optionally its version, similar to `go get`. Module name is required, but specific version and/or local replacement are optional.
@ -66,6 +71,12 @@ $ xcaddy build \
$ xcaddy build v2.0.1 \ $ xcaddy build v2.0.1 \
--with github.com/caddyserver/ntlm-transport@v0.1.1 --with github.com/caddyserver/ntlm-transport@v0.1.1
$ xcaddy build master \
--with github.com/caddyserver/ntlm-transport
$ xcaddy build a58f240d3ecbb59285303746406cab50217f8d24 \
--with github.com/caddyserver/ntlm-transport
$ xcaddy build \ $ xcaddy build \
--with github.com/caddyserver/ntlm-transport=../../my-fork --with github.com/caddyserver/ntlm-transport=../../my-fork