From 23effdec6baf8b871fd927e3b3b94cf4ac0ba93b Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Wed, 24 Mar 2021 11:48:13 +0100 Subject: [PATCH 1/4] Removed from the mospApiUrl /v1 and added a script to fix it for the release. --- CHANGELOG.md | 10 ++++++++++ INSTALL/INSTALL.ubuntu1804.md | 2 +- VERSION.json | 2 +- config/autoload/local.php.dist | 2 +- package.json | 2 +- scripts/update-all.sh | 2 ++ scripts/update_config_variable.sh | 14 ++++++++++++++ tests/config/local.php | 2 +- vagrant/bootstrap.sh | 2 +- 9 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 scripts/update_config_variable.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 446ef26..45cd7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ MONARC Changelog ================ +## 2.10.3 (2021-??-??) Includes bug-fixes and a new feature. + +### Fix + +TODO: add fixes! + +### New +- Implementation of the library objects import and assets export from/to MOSP. + ([#320](https://github.com/monarc-project/MonarcAppFO/issues/320)). + ## 2.10.2 (2021-02-24) Includes 3 bug-fixes and a new feature. ### Fix diff --git a/INSTALL/INSTALL.ubuntu1804.md b/INSTALL/INSTALL.ubuntu1804.md index d67ddf3..1f9cad7 100644 --- a/INSTALL/INSTALL.ubuntu1804.md +++ b/INSTALL/INSTALL.ubuntu1804.md @@ -219,7 +219,7 @@ local.php file: ], - 'mospApiUrl' => 'https://objects.monarc.lu/api/v1/' -+ 'mospApiUrl' => 'https://objects.monarc.lu/api/v1/', ++ 'mospApiUrl' => 'https://objects.monarc.lu/api/', + + 'statsApi' => [ + 'baseUrl' => 'http://127.0.0.1:5005', diff --git a/VERSION.json b/VERSION.json index aff8ee0..9118dc9 100644 --- a/VERSION.json +++ b/VERSION.json @@ -1 +1 @@ -{"major":2, "minor":10, "hotfix":2} +{"major":2, "minor":10, "hotfix":3} diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 6eb06e0..470aef5 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -74,7 +74,7 @@ return [ 'cliModel' => 'generic', ], - 'mospApiUrl' => 'https://objects.monarc.lu/api/v1/', + 'mospApiUrl' => 'https://objects.monarc.lu/api/', 'statsApi' => [ 'baseUrl' => 'http://127.0.0.1:5005', diff --git a/package.json b/package.json index 757cec6..428b782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "MONARC", - "version": "2.10.2", + "version": "2.10.3", "description": "Monarc front office application", "private": true, "repository": { diff --git a/scripts/update-all.sh b/scripts/update-all.sh index d76b2f5..55ea400 100755 --- a/scripts/update-all.sh +++ b/scripts/update-all.sh @@ -118,4 +118,6 @@ if [[ $forceClearCache -eq 0 && $bypass -eq 0 ]]; then touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade fi +./scripts/update_config_variables.sh + exit 0 diff --git a/scripts/update_config_variable.sh b/scripts/update_config_variable.sh new file mode 100644 index 0000000..22d8fb8 --- /dev/null +++ b/scripts/update_config_variable.sh @@ -0,0 +1,14 @@ +version=$(cat ./VERSION.json) +version_affected='{"major":2, "minor":10, "hotfix":3}' +if [[ $version == "$version_affected" ]]; then + for conf_file in /var/www/*/local.php + do + if [ -f "$conf_file" ]; then + sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "$conf_file" + echo "Done for $conf_file." + else + sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "./config/autoload/local.php" + echo "Done for ./config/autoload/local.php" + fi + done +fi diff --git a/tests/config/local.php b/tests/config/local.php index 5dc666d..58625b5 100644 --- a/tests/config/local.php +++ b/tests/config/local.php @@ -84,7 +84,7 @@ return [ 'from' => 'info@monarc.lu', ], - 'mospApiUrl' => 'https://objects.monarc.lu/api/v1/', + 'mospApiUrl' => 'https://objects.monarc.lu/api/', 'monarc' => [ 'ttl' => 60, diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index 3ab532b..27227d3 100644 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -329,7 +329,7 @@ return [ 'from' => 'info@monarc.lu', ], - 'mospApiUrl' => 'https://objects.monarc.lu/api/v1/', + 'mospApiUrl' => 'https://objects.monarc.lu/api/', 'monarc' => [ 'ttl' => 60, // timeout From e54a66088b505a217e2b8549bddaef815ee02dc0 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Thu, 25 Mar 2021 15:21:46 +0100 Subject: [PATCH 2/4] Remvoed the part of updating the clients configs. --- scripts/update_config_variable.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/update_config_variable.sh b/scripts/update_config_variable.sh index 22d8fb8..6021b78 100644 --- a/scripts/update_config_variable.sh +++ b/scripts/update_config_variable.sh @@ -1,14 +1,9 @@ version=$(cat ./VERSION.json) version_affected='{"major":2, "minor":10, "hotfix":3}' if [[ $version == "$version_affected" ]]; then - for conf_file in /var/www/*/local.php - do - if [ -f "$conf_file" ]; then - sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "$conf_file" - echo "Done for $conf_file." - else - sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "./config/autoload/local.php" - echo "Done for ./config/autoload/local.php" - fi - done + $conf_file='./config/autoload/local.php' + if [ -f "$conf_file" ]; then + sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "$conf_file" + echo "Done for $conf_file" + fi fi From 84883be187eeb96e0c8c8b5110db2c0707ba7263 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 23 Apr 2021 11:20:41 +0200 Subject: [PATCH 3/4] Fixed the script name. --- scripts/update_config_variables.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 scripts/update_config_variables.sh diff --git a/scripts/update_config_variables.sh b/scripts/update_config_variables.sh new file mode 100644 index 0000000..c7e42dc --- /dev/null +++ b/scripts/update_config_variables.sh @@ -0,0 +1,9 @@ +version=$(cat ./VERSION.json) +version_affected='{"major":2, "minor":10, "hotfix":3}' +if [[ $version == "$version_affected" ]]; then + conf_file='./config/autoload/local.php' + if [ -f "$conf_file" ]; then + sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "$conf_file" + echo "Done for $conf_file" + fi +fi From 22fb2fe28d4f79f34e3a8e7568fe22d9511eb4d7 Mon Sep 17 00:00:00 2001 From: Ruslan Baidan Date: Fri, 23 Apr 2021 11:20:57 +0200 Subject: [PATCH 4/4] Renamed the script. --- scripts/update_config_variable.sh | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 scripts/update_config_variable.sh diff --git a/scripts/update_config_variable.sh b/scripts/update_config_variable.sh deleted file mode 100644 index 6021b78..0000000 --- a/scripts/update_config_variable.sh +++ /dev/null @@ -1,9 +0,0 @@ -version=$(cat ./VERSION.json) -version_affected='{"major":2, "minor":10, "hotfix":3}' -if [[ $version == "$version_affected" ]]; then - $conf_file='./config/autoload/local.php' - if [ -f "$conf_file" ]; then - sed -i 's/https:\/\/objects.monarc.lu\/api\/v1\//https:\/\/objects.monarc.lu\/api\//g' "$conf_file" - echo "Done for $conf_file" - fi -fi