From f4e2375c3d5391813b31a8b86d932c206d7ce923 Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Sun, 27 Aug 2023 17:33:49 +0300 Subject: [PATCH] caddyserver.com (#3134) * caddyserver.com * +curl.se --- projects/caddyserver.com/package.yml | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 projects/caddyserver.com/package.yml diff --git a/projects/caddyserver.com/package.yml b/projects/caddyserver.com/package.yml new file mode 100644 index 00000000..aad086f2 --- /dev/null +++ b/projects/caddyserver.com/package.yml @@ -0,0 +1,51 @@ +distributable: + url: https://github.com/caddyserver/caddy/archive/v{{version}}.tar.gz + strip-components: 1 +versions: + github: caddyserver/caddy +build: + dependencies: + go.dev: '*' + curl.se: '*' + script: + - run: | + curl -L "$XCADDY" | tar zxf - --strip-components 1 + go run cmd/xcaddy/main.go build v{{version}} --output {{prefix}}/bin/caddy + working-directory: xcaddy + env: + XCADDY: https://github.com/caddyserver/xcaddy/archive/refs/tags/v0.3.5.tar.gz +provides: + - bin/caddy +test: + dependencies: + curl.se: '*' + script: + - caddy version | grep {{version}} + - run: | + port=8080 + + while lsof -i:$port >/dev/null 2>&1; do + ((port++)) + done + + port1=$port + port2=$((port + 1)) + + # Create the Caddyfile + cat > Caddyfile < /dev/null 2>&1 <