Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfixes: before release 0.8.0 #86

Merged
merged 12 commits into from
Aug 11, 2023
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
os: [ubuntu-20.04, ubuntu-22.04, macos-latest]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Update
if: startswith(matrix.os, 'ubuntu')
run: |
sudo apt-get update

Expand Down
24 changes: 16 additions & 8 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,37 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Generalize all scripts
- Configure events and agents threads

### Changed
- Link scripts with sc-machine and sc-web scripts
- Unify config file for sc-server and sc-builder

### Deprecated
- Deprecate `run_scweb.sh`, add `run_sc_web.sh` instead
- Deprecate and divide `prepare.sh` into `install_submodules.sh`, `install_dependencies.sh`, `build_sc_machine.sh` and `build_sc_web.sh`

### Removed
- Remove windows scripts
- Remove drawings and scp scripts
- Remove dump scripts
- Remove sctp-server scripts

## [0.7.0-Rebirth] - 13.10.2022
### Breaking actions
- Remove sctp-server scripts from projects that use ostis-web-platform
- Use py-sc-client and ts-sc-client for sc-server instead of sctp-clients for sctp-server

### Added
- Generalize all scripts
- Configure events and agents threads
- Add latex documentation from OSTIS Standard
- Add CI

### Changed
- Link scripts with sc-machine and sc-web scripts
- Deprecate `run_scweb.sh`, add `run_sc_web.sh` instead
- Deprecate and divide `prepare.sh` into `install_submodules.sh`, `install_dependencies.sh`, `build_sc_machine.sh` and `build_sc_web.sh`
- Unify config file for sc-server and sc-builder

### Removed
- Remove windows scripts
- Remove drawings and scp scripts
- Remove dump scripts
- Remove sctp-server scripts

## [0.6.1] - 28.04.2022
Expand Down
5 changes: 0 additions & 5 deletions ostis-web-platform.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ max_strings_channel_size = 100000
max_searchable_string_size = 1000
term_separators = " _"

max_strings_channels = 1000
max_strings_channel_size = 100000
max_searchable_string_size = 1000
term_separators = " _"

[sc-server]
host = 127.0.0.1
port = 8090
Expand Down
11 changes: 5 additions & 6 deletions scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ fi

function usage() {
cat <<USAGE
Usage: $0 [--dev]

Usage: $0 [--dev]

Options:
--dev: installs dependencies required to compile sc-machine and sc-web
Options:
--dev: installs dependencies required to compile sc-machine and sc-web
USAGE
exit 1
}
Expand All @@ -39,7 +38,7 @@ while [ "$1" != "" ]; do
shift 1 # remove the current value for `$1` and use the next
done

"${SC_MACHINE_PATH}/scripts/install_deps_ubuntu.sh" "${args[@]}"
"${SC_WEB_PATH}/scripts/install_deps_ubuntu.sh"
"${SC_MACHINE_PATH}/scripts/install_dependencies.sh" "${args[@]}"
"${SC_WEB_PATH}/scripts/install_dependencies.sh"

stage "Dependencies installed successfully"
53 changes: 28 additions & 25 deletions scripts/install_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ set -eo pipefail
CURRENT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
source "${CURRENT_DIR}/formats.sh"

if [[ -z "${PLATFORM_PATH}" || -z "${SC_MACHINE_REPO}" || -z "${SC_WEB_REPO}" \
|| -z "${SC_MACHINE_BRANCH}" || -z "${SC_WEB_BRANCH}" ]];
if [[ -z "${PLATFORM_PATH}" || -z "${SC_MACHINE_PATH}" || -z "${SC_WEB_PATH}" || -z "${SC_MACHINE_REPO}" || -z "${SC_WEB_REPO}" \
|| -z "${SC_MACHINE_BRANCH}" || -z "${SC_WEB_BRANCH}" || -z "${SC_MACHINE_COMMIT}" || -z "${SC_WEB_COMMIT}" ]];
then
source "${CURRENT_DIR}/set_vars.sh"
fi


usage() {
cat <<USAGE
Usage: $0 [update]
Usage: $0 [--update]

This script is used to download sources of ostis-web-platform and submodules
and install them. The exact behavior is configured via run arguments.

Options:
update: Remove ostis-web-platform submodules sources and download them from scratch.
--update: Remove ostis-web-platform submodules sources and download them from scratch.
USAGE
exit 1
}
Expand All @@ -32,50 +32,53 @@ clone_project()
exit 1
fi

if [[ ! -d "$2" || ${update} == 1 ]]; then
if (( ${update} == 1 ));
if [[ ! -d "$2" || ${update} == 1 ]];
then
if (( update == 1 ));
then
printf "Remove submodule %s (%s) %s \n" "$1" "$3" "$2"
printf "Remove submodule %s from %s\n" "$1" "$2"
rm -rf "$2"
git pull
fi

printf "Clone submodule %s (%s) into %s\n" "$1" "$3" "$2"
if [ -n "$4" ];
then
printf "Clone submodule %s (%s %s) into %s\n" "$1" "$3" "$4" "$2"
else
printf "Clone submodule %s (%s) into %s\n" "$1" "$3" "$2"
fi
git clone "$1" --branch "$3" --single-branch "$2" --recursive
if [ -n "$4" ];
then
cd "$2" && git checkout "$4"
fi
else
printf "You can update %s manually. Use this script with \"update\" parameter.\n" "$2"
printf "You can update %s manually. Use this script with \"--update\" option.\n" "$2"
fi
}

update=0

while [ "$1" != "" ]; do
while [ "$1" != "" ];
do
case $1 in
"update" )
"--update" )
update=1
;;
"--help" )
usage
;;
"help" )
usage
;;
"-h" )
"--help" | "-h" )
usage
;;
* )
usage
;;
esac
shift
esac
shift 1
done

stage "Clone submodules"

cd "${PLATFORM_PATH}"
cd "${PLATFORM_PATH}" && git submodule update --init --recursive

clone_project "${SC_MACHINE_REPO}" "${SC_MACHINE_PATH}" "${SC_MACHINE_BRANCH}"
clone_project "${SC_WEB_REPO}" "${SC_WEB_PATH}" "${SC_WEB_BRANCH}"
git submodule update --init --recursive
clone_project "${SC_MACHINE_REPO}" "${SC_MACHINE_PATH}" "${SC_MACHINE_BRANCH}" "${SC_MACHINE_COMMIT}"
clone_project "${SC_WEB_REPO}" "${SC_WEB_PATH}" "${SC_WEB_BRANCH}" "${SC_WEB_COMMIT}"

stage "Submodules cloned successfully"
6 changes: 3 additions & 3 deletions scripts/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ prepare()
echo -en "$1\n"
}

if (( ${build_sc_machine} == 1 ));
if (( build_sc_machine == 1 ));
then
prepare "SC-machine"

Expand All @@ -69,15 +69,15 @@ then
fi


if (( ${build_sc_web} == 1 )); then
if (( build_sc_web == 1 )); then
prepare "SC-web"

"${SC_WEB_PATH}/scripts/install_deps_ubuntu.sh"

"${SC_WEB_PATH}/scripts/build_sc_web.sh"
fi

if (( ${build_kb} == 1 )); then
if (( build_kb == 1 )); then
stage "Build knowledge base"
"${PLATFORM_PATH}/scripts/build_kb.sh"
fi
7 changes: 6 additions & 1 deletion scripts/run_scweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ NC='\033[0m' # No Color
echo -e "${YELLOW}[WARNING] This script was deprecated in ostis-web-platform 0.8.0.
Please, use scripts/run_sc_web.sh instead. It will be removed in ostis-web-platform 0.9.0.${NC}"

./run_sc_web.sh "$@"
if [ -z "${SC_WEB_PATH}" ];
then
source "$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"/set_vars.sh
fi

"${SC_WEB_PATH}/run_sc_web.sh" "$@"
2 changes: 2 additions & 0 deletions scripts/set_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ 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 SC_WEB_REPO="${SC_WEB_REPO:-https://github.com/ostis-ai/sc-web.git}"
export SC_WEB_BRANCH="${SC_WEB_BRANCH:-main}"
export SC_WEB_COMMIT="${SC_WEB_COMMIT:-""}"
export SC_WEB_PATH="${SC_WEB_PATH:-${PLATFORM_PATH}/sc-web}"

if [ -d "${SC_MACHINE_PATH}" ];
Expand Down
Loading