diff options
| -rw-r--r-- | composer.json | 12 | ||||
| -rwxr-xr-x | makesrc.sh | 28 | ||||
| -rw-r--r-- | php-doctrine-doctrine-cache-bundle.spec | 31 | 
3 files changed, 57 insertions, 14 deletions
| diff --git a/composer.json b/composer.json index 50cf129..2b9696c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@  {      "name":                 "doctrine/doctrine-cache-bundle", -    "homepage":             "http://www.doctrine-project.org", +    "homepage":             "https://www.doctrine-project.org",      "description":          "Symfony Bundle for Doctrine Cache",      "keywords":             ["cache", "caching"],      "type":                 "symfony-bundle", @@ -38,7 +38,7 @@          "doctrine/cache":          "^1.4.2"      },      "require-dev": { -        "phpunit/phpunit":                       "~4|~5", +        "phpunit/phpunit":                       "~4.8.36|~5.6|~6.5|~7.0",          "symfony/phpunit-bridge":                "~2.7|~3.3|~4.0",          "symfony/yaml":                          "~2.7|~3.3|~4.0",          "symfony/validator":                     "~2.7|~3.3|~4.0", @@ -57,7 +57,13 @@          "symfony/security-acl": "For using this bundle to cache ACLs"      },      "autoload": { -        "psr-4": { "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" } +        "psr-4": { "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" }, +        "exclude-from-classmap": [ +            "/Tests/" +        ] +    }, +    "autoload-dev": { +        "psr-4": { "Doctrine\\Bundle\\DoctrineCacheBundle\\Tests\\": "Tests" }      },      "extra": {          "branch-alias": { diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..97be9f6 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed   -n '/^%global github_owner/{s/.* //;p}'   $NAME.spec) +PROJECT=$(sed -n '/^%global github_name/{s/.* //;p}'    $NAME.spec) +VERSION=$(sed -n '/^%global github_version/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed  -n '/^%global github_commit/{s/.* //;p}'  $NAME.spec) +SHORT=${COMMIT:0:7} + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + +echo "Cloning..." +rm -rf $PROJECT-$COMMIT +git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT + +echo "Getting commit..." +pushd $PROJECT-$COMMIT +git checkout $COMMIT +cp composer.json ../composer.json +popd + +echo "Archiving..." +tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-doctrine-doctrine-cache-bundle.spec b/php-doctrine-doctrine-cache-bundle.spec index 936da3d..441484b 100644 --- a/php-doctrine-doctrine-cache-bundle.spec +++ b/php-doctrine-doctrine-cache-bundle.spec @@ -12,8 +12,9 @@  %global github_owner     doctrine  %global github_name      DoctrineCacheBundle -%global github_version   1.3.3 -%global github_commit    4c8e363f96427924e7e519c5b5119b4f54512697 +%global github_version   1.3.4 +%global github_commit    8b0d579ddef3fa3bc694bba49fba844668b4d382 +%global github_short     %(c=%{github_commit}; echo ${c:0:7})  %global composer_vendor  doctrine  %global composer_project doctrine-cache-bundle @@ -49,17 +50,16 @@ Version:       %{github_version}  Release:       1%{?dist}  Summary:       Symfony2 Bundle for Doctrine Cache -Group:         Development/Libraries  License:       MIT  URL:           https://github.com/%{github_owner}/%{github_name} -Source0:       %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +Source0:       %{name}-%{github_version}-%{github_short}.tgz +Source1:       makesrc.sh  BuildArch:     noarch  # Tests  %if %{with_tests}  ## composer.json  BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit)  %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8  BuildRequires: (php-composer(doctrine/cache) >= %{cache_min_ver} with php-composer(doctrine/cache) <  %{cache_max_ver})  BuildRequires: (php-composer(doctrine/inflector) >= %{inflector_min_ver} with php-composer(doctrine/inflector) <  %{inflector_max_ver}) @@ -70,6 +70,8 @@ BuildRequires: php-symfony4-finder  BuildRequires: php-symfony4-framework-bundle  BuildRequires: php-symfony4-validator  BuildRequires: php-symfony4-yaml +BuildRequires: phpunit7 +%global phpunit %{_bindir}/phpunit7  %else  BuildRequires: php-composer(doctrine/cache) <  %{cache_max_ver}  BuildRequires: php-composer(doctrine/cache) >= %{cache_min_ver} @@ -81,6 +83,8 @@ BuildRequires: php-symfony-finder  BuildRequires: php-symfony-framework-bundle  BuildRequires: php-symfony-validator  BuildRequires: php-symfony-yaml +BuildRequires: php-composer(phpunit/phpunit) +%global phpunit %{_bindir}/phpunit  %endif  %if 0  BuildRequires: php-composer(symfony/security) <  %{symfony_max_ver} @@ -89,7 +93,7 @@ BuildRequires: php-composer(symfony/security) >= %{symfony_min_ver}  BuildRequires: php-composer(symfony/security-acl) <  %{secacl_max_ver}  BuildRequires: php-composer(symfony/security-acl) >= %{secacl_min_ver}  %endif -## phpcompatinfo (computed from version 1.3.0) +## phpcompatinfo (computed from version 1.3.4)  BuildRequires: php-hash  BuildRequires: php-reflection  BuildRequires: php-spl @@ -111,7 +115,7 @@ Requires:      php-composer(doctrine/inflector) >= %{inflector_min_ver}  Requires:      php-composer(symfony/doctrine-bridge) <  %{symfony_max_ver}  Requires:      php-composer(symfony/doctrine-bridge) >= %{symfony_min_ver}  %endif -# phpcompatinfo (computed from version 1.3.0) +# phpcompatinfo (computed from version 1.3.4)  Requires:      php-hash  Requires:      php-reflection  Requires:      php-spl @@ -225,10 +229,10 @@ popd  : Upstream tests  RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in "" %{?rhel:php54 php55 php56 php70} php71 php72 php73; do -    if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then -        $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \ +for cmdarg in "php %{phpunit}" php71 php72 php73; do +    if which $cmdarg; then +        set $cmdarg +        $1 ${2:-%{_bindir}/phpunit7} --verbose --bootstrap bootstrap.php \              || RETURN_CODE=1      fi  done @@ -249,6 +253,11 @@ exit $RETURN_CODE  %changelog +* Thu Nov  8 2018 Remi Collet <remi@remirepo.net> - 1.3.4-1 +- update to 1.3.4 (no change) +- sources from git snapshot +- use phpunit7 +  * Wed Oct 17 2018 Remi Collet <remi@remirepo.net> - 1.3.3-1  - update to 1.3.3  - switch to Symfony 4 for test suite | 
