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

Merge branch 'release-1.0.5'

parents 38ecd0cd 5c2ef678
Loading
Loading
Loading
Loading
Loading

bump-version

0 → 100755
+61 −0
Original line number Diff line number Diff line
#!/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 '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;
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
        "ext-fileinfo":                  "*",
        "ext-json":                      "*",
        "ext-imagick":                   "*",
        "ext-readline":                  "*",
        "unicaen/app":                   "^1.3",
        "unicaen/auth":                  "^1.2",
        "unicaen/faq":                   "^1.0",
+74 −13
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
        "This file is @generated automatically"
    ],
    "content-hash": "946a5ea1f43e05305f62da7f28d3b592",
    "content-hash": "544dc6ec23d299678ca49734acb51b65",
    "packages": [
        {
            "name": "beberlei/assert",
@@ -1442,21 +1442,22 @@
        },
        {
            "name": "ramsey/uuid",
            "version": "3.7.3",
            "version": "3.8.0",
            "source": {
                "type": "git",
                "url": "https://github.com/ramsey/uuid.git",
                "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76"
                "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76",
                "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76",
                "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3",
                "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3",
                "shasum": ""
            },
            "require": {
                "paragonie/random_compat": "^1.0|^2.0",
                "php": "^5.4 || ^7.0"
                "paragonie/random_compat": "^1.0|^2.0|9.99.99",
                "php": "^5.4 || ^7.0",
                "symfony/polyfill-ctype": "^1.8"
            },
            "replace": {
                "rhumsaa/uuid": "self.version"
@@ -1464,16 +1465,17 @@
            "require-dev": {
                "codeception/aspect-mock": "^1.0 | ~2.0.0",
                "doctrine/annotations": "~1.2.0",
                "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1",
                "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0",
                "ircmaxell/random-lib": "^1.1",
                "jakub-onderka/php-parallel-lint": "^0.9.0",
                "mockery/mockery": "^0.9.9",
                "moontoast/math": "^1.1",
                "php-mock/php-mock-phpunit": "^0.3|^1.1",
                "phpunit/phpunit": "^4.7|^5.0",
                "phpunit/phpunit": "^4.7|^5.0|^6.5",
                "squizlabs/php_codesniffer": "^2.3"
            },
            "suggest": {
                "ext-ctype": "Provides support for PHP Ctype functions",
                "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator",
                "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator",
                "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
@@ -1518,7 +1520,7 @@
                "identifier",
                "uuid"
            ],
            "time": "2018-01-20T00:28:24+00:00"
            "time": "2018-07-19T23:38:55+00:00"
        },
        {
            "name": "rwoverdijk/assetmanager",
@@ -1754,6 +1756,64 @@
            "homepage": "https://symfony.com",
            "time": "2018-05-16T14:03:39+00:00"
        },
        {
            "name": "symfony/polyfill-ctype",
            "version": "v1.10.0",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/polyfill-ctype.git",
                "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
                "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
                "shasum": ""
            },
            "require": {
                "php": ">=5.3.3"
            },
            "suggest": {
                "ext-ctype": "For best performance"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "1.9-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "Symfony\\Polyfill\\Ctype\\": ""
                },
                "files": [
                    "bootstrap.php"
                ]
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Symfony Community",
                    "homepage": "https://symfony.com/contributors"
                },
                {
                    "name": "Gert de Pagter",
                    "email": "backendtea@gmail.com"
                }
            ],
            "description": "Symfony polyfill for ctype functions",
            "homepage": "https://symfony.com",
            "keywords": [
                "compatibility",
                "ctype",
                "polyfill",
                "portable"
            ],
            "time": "2018-08-06T14:22:27+00:00"
        },
        {
            "name": "symfony/polyfill-mbstring",
            "version": "v1.8.0",
@@ -1915,15 +1975,16 @@
        },
        {
            "name": "unicaen/auth",
            "version": "1.2.18",
            "version": "1.3.3",
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/auth.git",
                "reference": "87c6802dfadfcdc8b05602607ea69b959c1ec063"
                "reference": "2117b1ad811c1dbd1ad36de5d45da28abee62efd"
            },
            "require": {
                "bjyoungblood/bjy-authorize": ">=1.4",
                "jasig/phpcas": ">=1.3.3",
                "ramsey/uuid": "^3.7",
                "unicaen/app": "^1.3",
                "zf-commons/zfc-user-doctrine-orm": ">=0.1"
            },
@@ -1941,7 +2002,7 @@
                ]
            },
            "description": "Module d'authentification pour les applications Unicaen",
            "time": "2018-11-19T16:04:53+00:00"
            "time": "2019-01-29T14:35:35+00:00"
        },
        {
            "name": "unicaen/code",
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use Zend\Mail\Transport\Smtp;
return [
    'import-api' => [
        'etablissements' => [
            // code établissement => [config]
            'UNILIM' => [
                'url'      => 'https://sygal-import-ws:443', // https://{nom du service docker-compose}:443
                'proxy'    => false, // indispensable pour docker-compose run/exec
+2 −2
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ return [
        'app_infos' => [
            'nom'     => "SyGAL",
            'desc'    => "SYstème de Gestion et d'Accompagnement doctoraL",
            'version' => "1.0.3",
            'date'    => "05/12/2018",
            //'version' => cf. 'version.global.php'
            //'date'    => cf. 'version.global.php'
            'contact' => [
                'mail' => "assistance-sygal@unicaen.fr",
                //'tel' => "01 02 03 04 05",
Loading