mirror of
https://github.com/caddyserver/xcaddy.git
synced 2024-11-04 16:30:12 +00:00
Update name to xcaddy
This commit is contained in:
parent
22d82434ea
commit
f337ff945a
5 changed files with 11 additions and 11 deletions
|
@ -17,15 +17,15 @@ Supports Caddy 2 and up.
|
|||
|
||||
```go
|
||||
caddyVersion := "v2.0.0-beta.20"
|
||||
plugins := []builder.Dependency{
|
||||
builder.Dependency{
|
||||
plugins := []xcaddy.Dependency{
|
||||
xcaddy.Dependency{
|
||||
ModulePath: "github.com/caddyserver/nginx-adapter",
|
||||
Version: "6c484552e630ccac384d2d9c43c9d14c4e8d2e56",
|
||||
},
|
||||
}
|
||||
output := "./caddy"
|
||||
|
||||
err := builder.Build(caddyVersion, plugins, output)
|
||||
err := xcaddy.Build(caddyVersion, plugins, output)
|
||||
```
|
||||
|
||||
Versions can be anything compatible with `go get`.
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package builder
|
||||
package xcaddy
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
@ -24,7 +24,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/caddyserver/builder"
|
||||
"github.com/caddyserver/xcaddy"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -44,7 +44,7 @@ func main() {
|
|||
func runBuild(args []string) error {
|
||||
// parse the command line args... rather primitively
|
||||
var caddyVersion, output string
|
||||
var plugins []builder.Dependency
|
||||
var plugins []xcaddy.Dependency
|
||||
for i := 0; i < len(args); i++ {
|
||||
switch args[i] {
|
||||
case "--with":
|
||||
|
@ -59,7 +59,7 @@ func runBuild(args []string) error {
|
|||
if len(parts) == 2 {
|
||||
ver = parts[1]
|
||||
}
|
||||
plugins = append(plugins, builder.Dependency{
|
||||
plugins = append(plugins, xcaddy.Dependency{
|
||||
ModulePath: mod,
|
||||
Version: ver,
|
||||
})
|
||||
|
@ -89,7 +89,7 @@ func runBuild(args []string) error {
|
|||
}
|
||||
|
||||
// perform the build
|
||||
err := builder.Build(caddyVersion, plugins, output)
|
||||
err := xcaddy.Build(caddyVersion, plugins, output)
|
||||
if err != nil {
|
||||
log.Fatalf("[FATAL] %v", err)
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ func runDev(caddyVersion string, args []string) error {
|
|||
moduleDir := strings.TrimSpace(string(out))
|
||||
|
||||
// build caddy with this module plugged in
|
||||
err = builder.Build(caddyVersion, []builder.Dependency{
|
||||
err = xcaddy.Build(caddyVersion, []xcaddy.Dependency{
|
||||
{
|
||||
ModulePath: currentModule,
|
||||
Replace: moduleDir,
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package builder
|
||||
package xcaddy
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/caddyserver/builder
|
||||
module github.com/caddyserver/xcaddy
|
||||
|
||||
go 1.14
|
||||
|
||||
|
|
Loading…
Reference in a new issue