Fixed the scripts paths and removed the githuib libraries pulling as all the projects are on packagist.

pull/202/head
Ruslan Baidan 2019-09-12 14:38:30 +02:00
parent f9cc0f1ec1
commit 011fe9812a
No known key found for this signature in database
GPG Key ID: 4B7724C136BF1D89
15 changed files with 51 additions and 59 deletions

View File

@ -71,8 +71,8 @@ Backend
$ mkdir module
$ cd module/
$ ln -s ./../vendor/monarc/core MonarcCore
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
$ ln -s ./../vendor/monarc/core Monarc\Core
$ ln -s ./../vendor/monarc/frontoffice Monarc\FrontOffice
Frontend
@ -97,7 +97,7 @@ Update MONARC (including npm config for explicit proxy)
Create initial user
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
# Configure apache (as root)

View File

@ -90,13 +90,13 @@ Create two symbolic links:
$ mkdir module
$ cd module/
$ ln -s ./../vendor/monarc/core MonarcCore
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
$ ln -s ./../vendor/monarc/core Monarc/Core
$ ln -s ./../vendor/monarc/frontoffice Monarc/FrontOffice
There are 2 parts:
* MonarcFO is only for front office;
* MonarcCore is common to the front office and to the back office.
* Monarc\FrontOffice is only for front office;
* Monarc\Core is common to the front office and to the back office.
### Frontend
@ -188,7 +188,7 @@ execute the database migration scripts and compile the translations.
# Create initial user
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
The username is *admin@admin.test* and the password is *admin*.

View File

@ -80,19 +80,19 @@ Clone the repository and invoke `composer` using the shipped `composer.phar`:
### Back-end
The back-end is using the Zend Framework.
The back-end is using the Zend Framework 3.
Create two symbolic links:
$ mkdir module
$ cd module/
$ ln -s ./../vendor/monarc/core MonarcCore
$ ln -s ./../vendor/monarc/frontoffice MonarcFO
$ ln -s ./../vendor/monarc/core Monarc/Core
$ ln -s ./../vendor/monarc/frontoffice Monarc/FrontOffice
There are 2 parts:
* MonarcFO is only for MONARC;
* MonarcCore is common to MONARC and to the back office of MONARC.
* Monarc\FrontOffice is only for MONARC;
* Monarc\Core is common to MONARC and to the back office of MONARC.
### Front-end
@ -175,7 +175,7 @@ then update MONARC:
# 4. Create initial user
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
$ php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
The username is *admin@admin.test* and the password is *admin*.

View File

@ -17,20 +17,17 @@
"ext-pdo": "*",
"monarc/core": "dev-feature/upgrade-to-zf3",
"monarc/frontoffice": "dev-feature/upgrade-to-zf3",
"phpoffice/phpword": "dev-stable",
"monarc/phpword": "dev-master",
"zendframework/zend-component-installer": "^2.1",
"zendframework/zend-mvc": "^3.1",
"zendframework/zend-di": "^3.1",
"zendframework/zend-permissions-rbac": "^3.0",
"zendframework/zend-log": "^2.11"
},
"require-dev": {
"roave/security-advisories": "dev-master"
},
"config": {
"bin-dir": "bin/"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/monarc-project/monarc_phpword"
}
]
}
}

View File

@ -22,6 +22,7 @@ if (!empty($appConfDir)) {
return [
'modules' => [
'Zend\Mail',
'Zend\Log',
'Monarc\Core',
'Monarc\FrontOffice',

View File

@ -1,6 +1,5 @@
<?php
use Monarc\Core\Service\Initializer\ObjectManagerInitializer;
use Zend\Mvc\Application;
chdir(dirname(__DIR__));
@ -18,7 +17,7 @@ if(date_default_timezone_get() != ini_get('date.timezone')){
date_default_timezone_set('Europe/Luxembourg');
}
include 'vendor/autoload.php';
require 'vendor/autoload.php';
if (! class_exists(Application::class)) {
throw new RuntimeException(

View File

@ -10,9 +10,9 @@ checkout_if_exists() {
checkout_if_exists . $1
checkout_if_exists module/MonarcCore $1
checkout_if_exists module/MonarcBO $1
checkout_if_exists module/MonarcFO $1
checkout_if_exists module/Monarc/Core $1
checkout_if_exists module/Monarc/BackOffice $1
checkout_if_exists module/Monarc/FrontOffice $1
checkout_if_exists node_modules/ng_backoffice $1
checkout_if_exists node_modules/ng_client $1
checkout_if_exists node_modules/ng_anr $1

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Usage: ./scripts/client-upgrade-db.sh <module> <hostname> <user> <password> <db>
# Example: ./scripts/client-upgrade-db.sh MonarcBO localhost root derp monarc_backoffice
# Example: ./scripts/client-upgrade-db.sh Monarc/BackOffice localhost root derp monarc_backoffice
MODULE=$1
SQLHOST=$2
@ -11,20 +11,20 @@ SQLBASE=$5
path=""
case $MODULE in
"MonarcCore"|"core")
path="module/MonarcCore"
"Monarc/Core"|"core")
path="module/Monarc/Core"
if [ ! -d $path ]; then
path="vendor/monarc/core"
fi
;;
"MonarcFO"|"frontoffice")
path="module/MonarcFO"
"Monarc/FrontOffice"|"frontoffice")
path="module/Monarc/FrontOffice"
if [ ! -d $path ]; then
path="vendor/monarc/frontoffice"
fi
;;
"MonarcBO"|"backoffice")
path="module/MonarcBO"
"Monarc/BackOffice"|"backoffice")
path="module/Monarc/BackOffice"
if [ ! -d $path ]; then
path="vendor/monarc/backoffice"
fi

View File

@ -1,14 +1,14 @@
#!/bin/bash
if [ -d module/MonarcCore ]; then
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcCore/migrations/phinx.php
if [ -d module/Monarc/Core ]; then
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/Core/migrations/phinx.php
fi
if [ -d module/MonarcBO ]; then
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcBO/migrations/phinx.php
if [ -d module/Monarc/BackOffice ]; then
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/BackOffice/migrations/phinx.php
fi
if [ -d module/MonarcFO ]; then
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
if [ -d module/Monarc/FrontOffice ]; then
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php
fi

View File

@ -89,19 +89,19 @@ fi
currentPath=`pwd`
pathCore="module/MonarcCore"
pathCore="module/Monarc/Core"
if [ -d $pathCore ]; then
pull_if_exists $pathCore
else
pathCore="vendor/monarc/core"
fi
pathBO="module/MonarcBO"
pathBO="module/Monarc/BackOffice"
if [ -d $pathBO ]; then
pull_if_exists $pathBO
else
pathBO="vendor/monarc/backoffice"
fi
pathFO="module/MonarcFO"
pathFO="module/Monarc/FrontOffice"
if [ -d $pathFO ]; then
pull_if_exists $pathFO
else
@ -153,7 +153,7 @@ fi
if [[ $forceClearCache -eq 1 ]]; then
# Clear doctrine cache
# Move to MonarcCore Module.php
# Move to Monarc/Core Module.php
$phpcommand ./public/index.php orm:clear-cache:metadata
$phpcommand ./public/index.php orm:clear-cache:query
$phpcommand ./public/index.php orm:clear-cache:result

View File

@ -1,11 +1,11 @@
#!/bin/bash
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcCore/migrations/phinx.php
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/Core/migrations/phinx.php
if [ -d module/MonarcBO ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcBO/migrations/phinx.php
if [ -d module/Monarc/BackOffice ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/BackOffice/migrations/phinx.php
fi
if [ -d module/MonarcFO ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/MonarcFO/migrations/phinx.php
if [ -d module/Monarc/FrontOffice ]; then
php ./vendor/robmorgan/phinx/bin/phinx migrate -c ./module/Monarc/FrontOffice/migrations/phinx.php
fi

View File

@ -11,9 +11,9 @@ oldurl_if_exists() {
oldurl_if_exists . $1
oldurl_if_exists module/MonarcCore $1
oldurl_if_exists module/MonarcBO $1
oldurl_if_exists module/MonarcFO $1
oldurl_if_exists module/Monarc/Core $1
oldurl_if_exists module/Monarc/BackOffice $1
oldurl_if_exists module/Monarc/FrontOffice $1
oldurl_if_exists node_modules/ng_backoffice $1
oldurl_if_exists node_modules/ng_client $1
oldurl_if_exists node_modules/ng_anr $1

View File

@ -26,7 +26,6 @@ MONARC will be automatically deployed in an Ubuntu Bionic Server.
$ git clone https://github.com/monarc-project/MonarcAppFO
$ cd MonarcAppFO/vagrant
$ export GITHUB_AUTH_TOKEN=<your-github-auth-token>
$ vagrant up
Once the VM will be configured by Vagrant, go to the address

2
vagrant/Vagrantfile vendored
View File

@ -11,7 +11,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/bionic64"
config.vm.provision :shell, path: "bootstrap.sh", args: "#{ENV['GITHUB_AUTH_TOKEN']}"
config.vm.provision :shell, path: "bootstrap.sh"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs

View File

@ -1,8 +1,5 @@
#! /usr/bin/env bash
# Variables
GITHUB_AUTH_TOKEN=$1
TAG=''
PATH_TO_MONARC='/home/ubuntu/monarc'
@ -143,7 +140,6 @@ fi
echo -e "\n--- Retrieving MONARC libraries… ---\n"
# TODO: Can be removed when we move to packagis.
composer config -g github-oauth.github.com $GITHUB_AUTH_TOKEN
composer install -o
# Back-end
@ -306,7 +302,7 @@ echo -e "\n--- Update the project… ---\n"
echo -e "\n--- Create initial user and client ---\n"
php ./vendor/robmorgan/phinx/bin/phinx seed:run -c ./module/MonarcFO/migrations/phinx.php
php ./bin/phinx seed:run -c ./module/Monarc/FrontOffice/migrations/phinx.php