From b1888e516c9c9d750726318227bf69856ec91b8b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 31 Aug 2018 21:41:53 +0300 Subject: Add ci-load --- brep/handler/ci/ci.bash.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'brep/handler/ci/ci.bash.in') diff --git a/brep/handler/ci/ci.bash.in b/brep/handler/ci/ci.bash.in index 023e98e..d5af34b 100644 --- a/brep/handler/ci/ci.bash.in +++ b/brep/handler/ci/ci.bash.in @@ -39,3 +39,27 @@ function exit_with_manifest () # manifest_serializer_finish run exit 0 } + +# Dump the repositories.manifest and packages.manifest files into the +# specified directory by running bpkg-rep-info command for the specified +# repository and using the specified fetch timeout (in seconds). +# +function dump_repository_manifests () # +{ + local url="$1" + local dir="$2" + local tmo="$3" + + if ! run_silent bpkg rep-info --fetch-timeout "$tmo" --manifest \ +--repositories --repositories-file "$dir/repositories.manifest" \ +--packages --packages-file "$dir/packages.manifest" "$url"; then + + # Perform the sanity check to make sure that bpkg is runnable. + # + if ! run bpkg --version >/dev/null; then + error "unable to run bpkg" + fi + + exit_with_manifest 422 "unable to fetch repository information (run 'bpkg rep-info $url' for details)" + fi +} -- cgit v1.1