mirror of
https://github.com/Luzifer/archrepo.git
synced 2024-12-20 21:21:19 +00:00
Prevent faked from shitting itself
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fefafe6740
commit
ca9b31d713
1 changed files with 10 additions and 9 deletions
|
@ -11,8 +11,8 @@ REPO=${1:-}
|
||||||
step "Checking for changes from last build"
|
step "Checking for changes from last build"
|
||||||
last_remote_hash=$(git ls-remote ${REPO} master | awk '{print $1}')
|
last_remote_hash=$(git ls-remote ${REPO} master | awk '{print $1}')
|
||||||
grep "${REPO}#${last_remote_hash}" .repo_cache && {
|
grep "${REPO}#${last_remote_hash}" .repo_cache && {
|
||||||
warn "Remote has no changes from last build, skipping..."
|
warn "Remote has no changes from last build, skipping..."
|
||||||
exit 0
|
exit 0
|
||||||
} || true
|
} || true
|
||||||
|
|
||||||
# Create working dir
|
# Create working dir
|
||||||
|
@ -21,7 +21,7 @@ mkdir -p "${TMPDIR}/cfg"
|
||||||
|
|
||||||
# Ensure cleanup on script exit
|
# Ensure cleanup on script exit
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
rm -rf "${TMPDIR}"
|
rm -rf "${TMPDIR}"
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
@ -33,12 +33,13 @@ docker pull gcr.io/luzifer-registry/arch-repo-builder
|
||||||
|
|
||||||
step "Building package $(basename ${REPO})"
|
step "Building package $(basename ${REPO})"
|
||||||
docker run --rm -ti \
|
docker run --rm -ti \
|
||||||
-v "${TMPDIR}/src:/src" \
|
-v "${TMPDIR}/src:/src" \
|
||||||
-v "${TMPDIR}/cfg:/config" \
|
-v "${TMPDIR}/cfg:/config" \
|
||||||
-v "${REPO_DIR}:/repo" \
|
-v "${REPO_DIR}:/repo" \
|
||||||
-v "$(pwd)/scripts/pacman.conf:/etc/pacman.conf:ro" \
|
-v "$(pwd)/scripts/pacman.conf:/etc/pacman.conf:ro" \
|
||||||
gcr.io/luzifer-registry/arch-repo-builder \
|
--ulimit nofile=262144:262144 \
|
||||||
"${REPO}"
|
gcr.io/luzifer-registry/arch-repo-builder \
|
||||||
|
"${REPO}"
|
||||||
|
|
||||||
step "Updating cache entry"
|
step "Updating cache entry"
|
||||||
grep -v "^${REPO}#" .repo_cache >.repo_cache.tmp || true
|
grep -v "^${REPO}#" .repo_cache >.repo_cache.tmp || true
|
||||||
|
|
Loading…
Reference in a new issue