mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 06:20:18 +00:00
362a4fc76d
* update go mod file Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix rules endpoint tests Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix yaml file Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix build Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * address comments Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * remove roles from alarms Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * change approach for schema combaine Signed-off-by: Arvindh <arvindh91@gmail.com> * change approach for schema combaine Signed-off-by: Arvindh <arvindh91@gmail.com> * fix permissions for rules Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix authorization file Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix linter Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> * fix linter Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> --------- Signed-off-by: nyagamunene <stevenyaga2014@gmail.com> Signed-off-by: Arvindh <arvindh91@gmail.com> Co-authored-by: Arvindh <arvindh91@gmail.com>
46 lines
1.0 KiB
Bash
Executable File
46 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Abstract Machines
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
###
|
|
# Fetches the latest version of the docker files from the SuperMQ repository.
|
|
###
|
|
|
|
set -e
|
|
set -o pipefail
|
|
|
|
REPO_URL=https://github.com/absmach/supermq
|
|
TEMP_DIR="supermq"
|
|
DOCKER_DIR="docker"
|
|
DOCKER_DST_DIR="../docker"
|
|
DEST_DIR="../docker/supermq-docker"
|
|
COMBINE_SCHEMA_SCRIPT="./combine-schema.sh"
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "$SCRIPT_DIR" || exit 1
|
|
|
|
if [ -n "$(git status --porcelain "$DOCKER_DST_DIR")" ]; then
|
|
echo "There are uncommitted changes in '$DOCKER_DIR' dir. Please commit or stash them before running this script."
|
|
exit 1
|
|
fi
|
|
|
|
cleanup() {
|
|
rm -rf "$TEMP_DIR"
|
|
}
|
|
cleanup
|
|
trap cleanup EXIT
|
|
|
|
git clone --depth 1 --filter=blob:none --sparse "$REPO_URL"
|
|
cd "$TEMP_DIR"
|
|
git sparse-checkout set "$DOCKER_DIR"
|
|
|
|
if [ -d "$DEST_DIR" ]; then
|
|
rm -r "$DEST_DIR"
|
|
fi
|
|
mkdir -p "$DEST_DIR"
|
|
mv -f "$DOCKER_DIR"/.??* "$DOCKER_DIR"/* "$DEST_DIR"/
|
|
cd ..
|
|
rm -rf "$TEMP_DIR"
|
|
|
|
sh "$COMBINE_SCHEMA_SCRIPT"
|