diff --git a/fetch-latest-releases.lua b/fetch-latest-releases.lua index fc74dea..2aaa3cb 100755 --- a/fetch-latest-releases.lua +++ b/fetch-latest-releases.lua @@ -8,7 +8,7 @@ local cqueues = require("cqueues") local yaml = require("lyaml") local lfs = require("lfs") -local mirror = "https://cz.alpinelinux.org/alpine" +local mirror = os.getenv("MIRROR") or "https://cz.alpinelinux.org/alpine" function fatal(...) errormsg(...) diff --git a/prepare-branch.sh b/prepare-branch.sh index f133a03..72b74e6 100755 --- a/prepare-branch.sh +++ b/prepare-branch.sh @@ -1,6 +1,5 @@ #!/bin/sh -e - run_tests() { local branch="$1" local dir="$2" @@ -15,7 +14,11 @@ prepare() { local branch="$1" local dir=$(mktemp -d /tmp/docker-brew-alpine-XXXXXX) docker build -t docker-brew-alpine-fetch . - docker run --user $(id -u) --rm -it -v $dir:/out docker-brew-alpine-fetch $branch /out + docker run \ + ${MIRROR+ -e "MIRROR=$MIRROR"} \ + --user $(id -u) --rm -it \ + -v $dir:/out \ + docker-brew-alpine-fetch $branch /out echo "=> Verifying checksums" ( cd $dir && sha512sum -c checksums.sha512) echo "=> temp dir: $dir"