mirror of
https://github.com/absmach/supermq.git
synced 2026-06-23 07:30:25 +00:00
MG-67 - Update Magistrala Compose with SuperMQ Compose (#76)
* chore: update compose with supermq override Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: remove duplicate env variables Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * ci(check-license.yaml): ignore rabbitmq files Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor: add supermq docker file Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * feat: add update option to make file Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor(supermq-docker-compose.override.yml): fix errors in files Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor: add amend commit to fetch and update commands Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: add supermq dependency update script Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: update SuperMQ dependency files * fix: remove reverted changes to Makefile Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor(supermq.sh): remove git staging and commit from script Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: remove redundant docker config files Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: remove redundant files, update compose p[roject directory Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: update project dir path Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: update nginv env file variable, remove redundant nginx config files Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore: include journal and certs to mg compose Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor: update script to use sparse checkout and move docker files into ./docker/supermq-docker Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor: update docker compose file Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * feat(Makefile): add fetch_supermq to run recipe Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * refactor(supermq.sh): clean up Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * chore(go.mod): remove toolchain definition Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * ci(build.yml): add check for supermq dependency Signed-off-by: Felix Gateru <felix.gateru@gmail.com> * ci: move check to ci Signed-off-by: Felix Gateru <felix.gateru@gmail.com> --------- Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
This commit is contained in:
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/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"
|
||||
DEST_DIR="../../docker/supermq-docker"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR" || exit 1
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "There are uncommitted changes. Please commit or stash them before running this script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$TEMP_DIR"
|
||||
}
|
||||
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"/{*,.*} "$DEST_DIR"
|
||||
cd ..
|
||||
rm -rf "$TEMP_DIR"
|
||||
Reference in New Issue
Block a user