diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-07-27 06:56:37 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-07-29 00:44:02 +0100 |
commit | b85f09f4b075e097110c1d9c5070bdc3742d656f (patch) | |
tree | 55a4ab0abef2e2ce35c889d31ca5019329d9ca47 | |
parent | d82e31622769571672e24b9620f47b1830aec592 (diff) |
ci: Add mirroring script
Provide a mirror job to synchronise libcamera mirrors based on a local
configuration file.
The file 'libcamera-mirrors' is read one line at a time for remotes to
push to. Blank lines and lines prefixed with '#' are ignored.
The server running the job must have correct credentials to push to
the remote.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rwxr-xr-x | 02-update-mirrors.sh | 21 | ||||
-rwxr-xr-x | libcamera-mirrors.example | 6 |
2 files changed, 27 insertions, 0 deletions
diff --git a/02-update-mirrors.sh b/02-update-mirrors.sh new file mode 100755 index 0000000..350b3c9 --- /dev/null +++ b/02-update-mirrors.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0-or-later + +source ./common.sh + +ID=mirror + +LIBCAMERA=${1:-$(srcdir libcamera)} + +check_version $LIBCAMERA $ID + +echo "Mirroring libcamera at version : " $(libcamera_version "$LIBCAMERA") + +sed -e '/#.*/d' -e '/^$/d' libcamera-mirrors | while read remote ; +do + echo "Mirroring to remote : " $remote + git -C $LIBCAMERA push $remote master:refs/heads/master +done + +completed $ID diff --git a/libcamera-mirrors.example b/libcamera-mirrors.example new file mode 100755 index 0000000..d26203f --- /dev/null +++ b/libcamera-mirrors.example @@ -0,0 +1,6 @@ +# Set one mirror per line. +# The system running the job must have credentials to push to +# that server. +# git@github.com:libcamera-org/libcamera.git + +#git@gitlab.com:libcamera/libcamera.git |