Commit b68be0ef authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'develop' into postgres

parents 1d9e7078 144f7a31
CHANGELOG
=========
1.0.0 (19/09/2019)
------------------
### Ajout
- Embryon d'application.
This diff is collapsed.
#!/usr/bin/env php
<?php
/**
* Script à utiliser pour mettre à jour la version courante de l'application,
* configurée dans 'config/autoload/version.global.php'.
*
* Usage: bump-version [<version>]
*
* Ex: bump-version 1.3
*/
require __DIR__ . '/../vendor/autoload.php';
use Zend\Config\Writer\PhpArray;
$defaultConfig = [
'unicaen-app' => [
'app_infos' => [
'version' => 'Aucune',
],
]
];
$configFilepath = 'config/autoload/version.global.php';
echo "Fichier de config: $configFilepath" . PHP_EOL;
if (!is_readable($configFilepath)) {
echo "Fichier de config $configFilepath introuvable ou illisible." . PHP_EOL;
exit(1);
}
$config = require $configFilepath;
if (! isset($config['unicaen-app']['app_infos']['version'])) {
$config = array_merge_recursive($config, $defaultConfig);
}
$current = $config['unicaen-app']['app_infos']['version'];
echo sprintf("Version actuelle: %s.", $current) . PHP_EOL;
$new = isset($argv[1]) ? $argv[1] : null;
if ($new === null) {
$message = "Nouvelle version ? ";
$new = readline($message);
}
if (version_compare($new, $current) <= 0) {
echo ":-( Impossible, la nouvelle version doit être supérieure à l'actuelle." . PHP_EOL;
exit(1);
}
$config['unicaen-app']['app_infos']['version'] = $new;
$config['unicaen-app']['app_infos']['date'] = date('d/m/Y');
$config['comment'] = "Fichier généré le " . date('d/m/Y à H:i:s') . ' avec ' . __FILE__;
$phpArray = new PhpArray();
$phpArray
->setUseBracketArraySyntax(true)
->toFile($configFilepath, $config);
echo "Nouvelle version inscrite: $new" . PHP_EOL;
......@@ -19,8 +19,8 @@ return [
'app_infos' => [
'nom' => "NomDeVotreApplication",
'desc' => "Description succincte de votre application",
'version' => "0.0.1",
'date' => "07/11/2017",
//'version' => cf. 'version.global.php'
//'date' => cf. 'version.global.php'
'contact' => ['mail' => "dsi.applications@unicaen.fr", /*'tel' => "01 02 03 04 05"*/],
'mentionsLegales' => "http://www.unicaen.fr/acces-direct/mentions-legales/",
'informatiqueEtLibertes' => "http://www.unicaen.fr/acces-direct/informatique-et-libertes/",
......
<?php
return [
'unicaen-app' => [
'app_infos' => [
'version' => '1.0.0',
'date' => '19/09/2019',
],
],
'comment' => 'Fichier généré le 19/09/2019 à 07:52:13 avec /app/bin/bump-version',
];
#!/usr/bin/env bash
#
# This script runs required operations in order to set up the application.
#
# Composer install
composer install --no-dev --no-suggest --optimize-autoloader
# mpdf/mpdf/ttfontdata dir access
#chown -R www-data:root vendor/mpdf/mpdf/ttfontdata && chmod -R 770 vendor/mpdf/mpdf/ttfontdata
# Répertoire d'upload par défaut
#mkdir -p upload && chown -R www-data:root upload && chmod -R 770 upload
# Répertoires de travail de Doctrine
mkdir -p data/cache && chmod -R 777 data/cache
mkdir -p data/DoctrineModule/cache && chmod -R 777 data/DoctrineModule/cache
mkdir -p data/DoctrineORMModule/Proxy && chmod -R 777 data/DoctrineORMModule/Proxy
rm -rf data/cache/*
rm -rf data/DoctrineModule/cache/*
rm -rf data/DoctrineORMModule/Proxy/*
# Commandes Doctrine
vendor/bin/doctrine-module orm:clear-cache:query
vendor/bin/doctrine-module orm:clear-cache:metadata
vendor/bin/doctrine-module orm:clear-cache:result
vendor/bin/doctrine-module orm:generate-proxies
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment