From 6800e0bf023b95ab72daaa4db649dcbef2ee76ec Mon Sep 17 00:00:00 2001 From: Saymon Date: Sun, 13 Oct 2024 14:34:59 +0300 Subject: [PATCH] git: use submodules --- .gitignore | 3 --- .gitmodules | 12 ++++++++++++ sc-component-manager | 1 + sc-machine | 1 + scp-machine | 1 + scripts/install_minimal_platform.sh | 4 +--- scripts/install_submodules.sh | 4 +--- scripts/set_vars.sh | 11 ----------- .../install_sc_component_manager.sh | 12 ------------ scripts/submodule-scripts/install_sc_machine.sh | 12 ------------ scripts/submodule-scripts/install_scp_machine.sh | 12 ------------ .../submodule-scripts/update_sc_component_manager.sh | 12 ------------ scripts/submodule-scripts/update_sc_machine.sh | 12 ------------ scripts/submodule-scripts/update_scp_machine.sh | 12 ------------ 14 files changed, 17 insertions(+), 92 deletions(-) create mode 160000 sc-component-manager create mode 160000 sc-machine create mode 160000 scp-machine delete mode 100755 scripts/submodule-scripts/install_sc_component_manager.sh delete mode 100755 scripts/submodule-scripts/install_sc_machine.sh delete mode 100755 scripts/submodule-scripts/install_scp_machine.sh delete mode 100755 scripts/submodule-scripts/update_sc_component_manager.sh delete mode 100755 scripts/submodule-scripts/update_sc_machine.sh delete mode 100755 scripts/submodule-scripts/update_scp_machine.sh diff --git a/.gitignore b/.gitignore index f1e59279..0fcebae0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -sc-machine -scp-machine -sc-component-manager sc-web ims.ostis.kb diff --git a/.gitmodules b/.gitmodules index 08d4cdce..1b72672c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,15 @@ [submodule "docs/scn"] path = docs/scn url = https://github.com/ostis-ai/scn-latex-plugin +[submodule "sc-machine"] + path = sc-machine + url = git@github.com:ostis-ai/sc-machine.git + branch = main +[submodule "scp-machine"] + path = scp-machine + url = git@github.com:ostis-ai/scp-machine.git + branch = main +[submodule "sc-component-manager"] + path = sc-component-manager + url = git@github.com:ostis-ai/sc-component-manager.git + branch = main diff --git a/sc-component-manager b/sc-component-manager new file mode 160000 index 00000000..a253e0e8 --- /dev/null +++ b/sc-component-manager @@ -0,0 +1 @@ +Subproject commit a253e0e8c2f097a228ecad16a9d2bbea0a672d88 diff --git a/sc-machine b/sc-machine new file mode 160000 index 00000000..ea033575 --- /dev/null +++ b/sc-machine @@ -0,0 +1 @@ +Subproject commit ea03357598cb7a3cbaa23c27f8dcc02c6fcd55b2 diff --git a/scp-machine b/scp-machine new file mode 160000 index 00000000..26fc6ede --- /dev/null +++ b/scp-machine @@ -0,0 +1 @@ +Subproject commit 26fc6ede69164dd2b357223aec55a264b9b73e99 diff --git a/scripts/install_minimal_platform.sh b/scripts/install_minimal_platform.sh index db30738c..c9ead588 100755 --- a/scripts/install_minimal_platform.sh +++ b/scripts/install_minimal_platform.sh @@ -7,10 +7,8 @@ source "${SCRIPTS_DIR}/formats.sh" stage "Install ostis-web-platform" -"${SUBMODULE_SCRIPTS_DIR}/install_sc_machine.sh" +git submodule update --init --recursive --progress "${SCRIPTS_DIR}/install_sc_machine_dependencies.sh" --dev -"${SUBMODULE_SCRIPTS_DIR}/install_scp_machine.sh" -"${SUBMODULE_SCRIPTS_DIR}/install_sc_component_manager.sh" "${SCRIPTS_DIR}/build_sc_machine.sh" "${SCRIPTS_DIR}/build_scp_machine.sh" "${SCRIPTS_DIR}/build_sc_component_manager.sh" diff --git a/scripts/install_submodules.sh b/scripts/install_submodules.sh index 198f4254..0122d037 100755 --- a/scripts/install_submodules.sh +++ b/scripts/install_submodules.sh @@ -51,9 +51,7 @@ else cd "${PLATFORM_PATH}" && git submodule update --init --recursive - "${SUBMODULE_SCRIPTS_DIR}/install_sc_machine.sh" - "${SUBMODULE_SCRIPTS_DIR}/install_scp_machine.sh" - "${SUBMODULE_SCRIPTS_DIR}/install_sc_component_manager.sh" + git submodule update --init --recursive --progress "${SUBMODULE_SCRIPTS_DIR}/install_sc_web.sh" "${SUBMODULE_SCRIPTS_DIR}/install_ims_ostis_kb.sh" diff --git a/scripts/set_vars.sh b/scripts/set_vars.sh index 0fcd6b76..7cb0f9f0 100755 --- a/scripts/set_vars.sh +++ b/scripts/set_vars.sh @@ -8,19 +8,8 @@ export PLATFORM_PATH="${PLATFORM_PATH:-${ROOT_PATH}}" export CONFIG_PATH="${CONFIG_PATH:-${PLATFORM_PATH}/ostis-web-platform.ini}" export REPO_PATH="${REPO_PATH:-${PLATFORM_PATH}/repo.path}" -export SC_MACHINE_REPO="${SC_MACHINE_REPO:-https://github.com/ostis-ai/sc-machine.git}" -export SC_MACHINE_BRANCH="${SC_MACHINE_BRANCH:-main}" -export SC_MACHINE_COMMIT="${SC_MACHINE_COMMIT:-""}" export SC_MACHINE_PATH="${SC_MACHINE_PATH:-${PLATFORM_PATH}/sc-machine}" - -export SCP_MACHINE_REPO="${SCP_MACHINE_REPO:-https://github.com/ostis-ai/scp-machine.git}" -export SCP_MACHINE_BRANCH="${SCP_MACHINE_BRANCH:-main}" -export SCP_MACHINE_COMMIT="${SCP_MACHINE_COMMIT:-""}" export SCP_MACHINE_PATH="${SCP_MACHINE_PATH:-${PLATFORM_PATH}/scp-machine}" - -export SC_COMPONENT_MANAGER_REPO="${SC_COMPONENT_MANAGER_REPO:-https://github.com/ostis-ai/sc-component-manager.git}" -export SC_COMPONENT_MANAGER_BRANCH="${SC_COMPONENT_MANAGER_BRANCH:-main}" -export SC_COMPONENT_MANAGER_COMMIT="${SC_COMPONENT_MANAGER_COMMIT:-""}" export SC_COMPONENT_MANAGER_PATH="${SC_COMPONENT_MANAGER_PATH:-${PLATFORM_PATH}/sc-component-manager}" export SC_WEB_REPO="${SC_WEB_REPO:-https://github.com/ostis-ai/sc-web.git}" diff --git a/scripts/submodule-scripts/install_sc_component_manager.sh b/scripts/submodule-scripts/install_sc_component_manager.sh deleted file mode 100755 index 4af498d3..00000000 --- a/scripts/submodule-scripts/install_sc_component_manager.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SUBMODULE_SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -UTILS_DIR="${SUBMODULE_SCRIPTS_DIR}/utils" - -if [[ -z "${SC_COMPONENT_MANAGER_REPO}" || -z "${SC_COMPONENT_MANAGER_PATH}" || -z "${SC_COMPONENT_MANAGER_BRANCH}" || -z "${SC_COMPONENT_MANAGER_COMMIT}" ]]; -then - source "${SUBMODULE_SCRIPTS_DIR}/../set_vars.sh" -fi - -"${UTILS_DIR}/install_submodule.sh" --repo "${SC_COMPONENT_MANAGER_REPO}" --path "${SC_COMPONENT_MANAGER_PATH}" --branch "${SC_COMPONENT_MANAGER_BRANCH}" --commit "${SC_COMPONENT_MANAGER_COMMIT}" diff --git a/scripts/submodule-scripts/install_sc_machine.sh b/scripts/submodule-scripts/install_sc_machine.sh deleted file mode 100755 index b9a115eb..00000000 --- a/scripts/submodule-scripts/install_sc_machine.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SUBMODULE_SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -UTILS_DIR="${SUBMODULE_SCRIPTS_DIR}/utils" - -if [[ -z "${SC_MACHINE_REPO}" || -z "${SC_MACHINE_PATH}" || -z "${SC_MACHINE_BRANCH}" || -z "${SC_MACHINE_COMMIT}" ]]; -then - source "${SUBMODULE_SCRIPTS_DIR}/../set_vars.sh" -fi - -"${UTILS_DIR}/install_submodule.sh" --repo "${SC_MACHINE_REPO}" --path "${SC_MACHINE_PATH}" --branch "${SC_MACHINE_BRANCH}" --commit "${SC_MACHINE_COMMIT}" diff --git a/scripts/submodule-scripts/install_scp_machine.sh b/scripts/submodule-scripts/install_scp_machine.sh deleted file mode 100755 index 3b4fa571..00000000 --- a/scripts/submodule-scripts/install_scp_machine.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SUBMODULE_SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -UTILS_DIR="${SUBMODULE_SCRIPTS_DIR}/utils" - -if [[ -z "${SCP_MACHINE_REPO}" || -z "${SCP_MACHINE_PATH}" || -z "${SCP_MACHINE_BRANCH}" || -z "${SCP_MACHINE_COMMIT}" ]]; -then - source "${SUBMODULE_SCRIPTS_DIR}/../set_vars.sh" -fi - -"${UTILS_DIR}/install_submodule.sh" --repo "${SCP_MACHINE_REPO}" --path "${SCP_MACHINE_PATH}" --branch "${SCP_MACHINE_BRANCH}" --commit "${SCP_MACHINE_COMMIT}" diff --git a/scripts/submodule-scripts/update_sc_component_manager.sh b/scripts/submodule-scripts/update_sc_component_manager.sh deleted file mode 100755 index 0f236b9c..00000000 --- a/scripts/submodule-scripts/update_sc_component_manager.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SUBMODULE_SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -UTILS_DIR="${SUBMODULE_SCRIPTS_DIR}/utils" - -if [[ -z "${SC_COMPONENT_MANAGER_REPO}" || -z "${SC_COMPONENT_MANAGER_PATH}" || -z "${SC_COMPONENT_MANAGER_BRANCH}" || -z "${SC_COMPONENT_MANAGER_COMMIT}" ]]; -then - source "${SUBMODULE_SCRIPTS_DIR}/../set_vars.sh" -fi - -"${UTILS_DIR}/update_submodule.sh" --repo "${SC_COMPONENT_MANAGER_REPO}" --path "${SC_COMPONENT_MANAGER_PATH}" --branch "${SC_COMPONENT_MANAGER_BRANCH}" --commit "${SC_COMPONENT_MANAGER_COMMIT}" diff --git a/scripts/submodule-scripts/update_sc_machine.sh b/scripts/submodule-scripts/update_sc_machine.sh deleted file mode 100755 index 880dbce0..00000000 --- a/scripts/submodule-scripts/update_sc_machine.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SUBMODULE_SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -UTILS_DIR="${SUBMODULE_SCRIPTS_DIR}/utils" - -if [[ -z "${SC_MACHINE_REPO}" || -z "${SC_MACHINE_PATH}" || -z "${SC_MACHINE_BRANCH}" || -z "${SC_MACHINE_COMMIT}" ]]; -then - source "${SUBMODULE_SCRIPTS_DIR}/../set_vars.sh" -fi - -"${UTILS_DIR}/update_submodule.sh" --repo "${SC_MACHINE_REPO}" --path "${SC_MACHINE_PATH}" --branch "${SC_MACHINE_BRANCH}" --commit "${SC_MACHINE_COMMIT}" diff --git a/scripts/submodule-scripts/update_scp_machine.sh b/scripts/submodule-scripts/update_scp_machine.sh deleted file mode 100755 index 51ffd1a5..00000000 --- a/scripts/submodule-scripts/update_scp_machine.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -SUBMODULE_SCRIPTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd) -UTILS_DIR="${SUBMODULE_SCRIPTS_DIR}/utils" - -if [[ -z "${SCP_MACHINE_REPO}" || -z "${SCP_MACHINE_PATH}" || -z "${SCP_MACHINE_BRANCH}" || -z "${SCP_MACHINE_COMMIT}" ]]; -then - source "${SUBMODULE_SCRIPTS_DIR}/../set_vars.sh" -fi - -"${UTILS_DIR}/update_submodule.sh" --repo "${SCP_MACHINE_REPO}" --path "${SCP_MACHINE_PATH}" --branch "${SCP_MACHINE_BRANCH}" --commit "${SCP_MACHINE_COMMIT}"