From deaed185a71ddfdcd2898d316d03379b7b37cee0 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 4 Sep 2017 11:57:00 +0200 Subject: [PATCH 1/3] Update to 1.7.1 use git snapshot for sources skip test with phpspec v4 (cherry picked from commit 485bbf906f141c2cf8dae8de7b1a3bbe497be4da) --- .gitignore | 1 + makesrc.sh | 28 +++++++++++++++++++++++++++ php-phpspec-prophecy.spec | 40 ++++++++++++++++++++++++++++----------- sources | 2 +- 4 files changed, 59 insertions(+), 12 deletions(-) create mode 100755 makesrc.sh diff --git a/.gitignore b/.gitignore index 71d6719..28d878e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ clog /prophecy-1.6.1-58a8137.tar.gz /prophecy-1.6.2-6c52c27.tar.gz /prophecy-1.7.0-93d39f1.tar.gz +/php-phpspec-prophecy-1.7.1-15ea9ac.tgz diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..87d223d --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global gh_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 .git $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index da27599..673e451 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,26 +7,27 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 93d39f1f7f9326d746203c7c056f300f7f126073 +%global gh_commit 15ea9ac619e37009edcda64089e3fa4cc88aa659 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy %if %{bootstrap} # no test because of circular dependency with phpspec -%global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%global with_tests 0%{?_with_tests:1} %else -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} +%global with_tests 0%{!?_without_tests:1} %endif Name: php-phpspec-prophecy -Version: 1.7.0 -Release: 4%{?dist} +Version: 1.7.1 +Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP Group: Development/Libraries License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz +Source0: %{name}-%{version}-%{gh_short}.tgz +Source2: makesrc.sh # Autoloader Source1: %{name}-autoload.php @@ -43,12 +44,13 @@ BuildRequires: php-composer(fedora/autoloader) # from composer.json, "requires": { # "php": "^5.3|^7.0", -# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", +# "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", # "sebastian/comparator": "^1.1|^2.0", # "doctrine/instantiator": "^1.0.2", # "sebastian/recursion-context": "^1.0|^2.0|^3.0" Requires: php(language) >= 5.3 Requires: php-composer(phpdocumentor/reflection-docblock) >= 2.0 +# ignore v4 for now Requires: php-composer(phpdocumentor/reflection-docblock) < 4 Requires: php-composer(sebastian/comparator) >= 1.1 Requires: php-composer(sebastian/comparator) < 3 @@ -93,10 +95,21 @@ cp -pr src/* %{buildroot}%{_datadir}/php %check %if %{with_tests} -%{_bindir}/php \ - -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - %{_bindir}/phpspec \ - run --format pretty --verbose --no-ansi +phpspec --version +VER=$(phpspec --version | sed -n -e 's/.* //;s/\..*$//;p') +if [ $VER -ge 4 ]; then + : phpspec $VER is too recent + exit 0 +fi + +ret=0 +for cmd in php php70 php71 php72; do + if which $cmd; then + $cmd -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ + %{_bindir}/phpspec run --format pretty --verbose --no-ansi || ret=1 + fi +done +exit $ret %else : Test suite disabled %endif @@ -111,6 +124,11 @@ cp -pr src/* %{buildroot}%{_datadir}/php %changelog +* Mon Sep 4 2017 Remi Collet - 1.7.1-1 +- Update to 1.7.1 +- use git snapshot for sources +- skip test with phpspec v4 + * Thu Apr 13 2017 Shawn Iwinski - 1.7.0-4 - Prepare for php-phpdocumentor-reflection-docblock => php-phpdocumentor-reflection-docblock2 dependency rename diff --git a/sources b/sources index ac3d036..ab9aab9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (prophecy-1.7.0-93d39f1.tar.gz) = 3dd8ee1011d89936d880bc6d405dbc94a01e8f8ade1226264d4224cfd8acd8fa842485dba733a02cc7a8cd869fd7c3f5963d1a0dcb26c215a9534a6307d52f3d +SHA512 (php-phpspec-prophecy-1.7.1-15ea9ac.tgz) = c949536bdbbad8493bee56b3f6cb7a2353d938f9e3a54252a715883c44d26135adf9a2f9fdc9d02f33e4d0c071dcd8606b8cc718c8f7db3426b46ee48eca2380 From 1db86f14e7dc4eca8da32d3e024a39096029c5bf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 5 Sep 2017 06:57:42 +0200 Subject: [PATCH 2/3] v1.7.2 (cherry picked from commit a1d6f3e112f9b71ea84d6504e9c199d921f22dda) --- .gitignore | 1 + php-phpspec-prophecy.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 28d878e..6acb2f0 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ clog /prophecy-1.6.2-6c52c27.tar.gz /prophecy-1.7.0-93d39f1.tar.gz /php-phpspec-prophecy-1.7.1-15ea9ac.tgz +/php-phpspec-prophecy-1.7.2-c9b8c60.tgz diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 673e451..9385458 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 15ea9ac619e37009edcda64089e3fa4cc88aa659 +%global gh_commit c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -19,7 +19,7 @@ %endif Name: php-phpspec-prophecy -Version: 1.7.1 +Version: 1.7.2 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -124,6 +124,9 @@ exit $ret %changelog +* Tue Sep 5 2017 Remi Collet - 1.7.2-1 +- Update to 1.7.2 + * Mon Sep 4 2017 Remi Collet - 1.7.1-1 - Update to 1.7.1 - use git snapshot for sources diff --git a/sources b/sources index ab9aab9..d815eee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.7.1-15ea9ac.tgz) = c949536bdbbad8493bee56b3f6cb7a2353d938f9e3a54252a715883c44d26135adf9a2f9fdc9d02f33e4d0c071dcd8606b8cc718c8f7db3426b46ee48eca2380 +SHA512 (php-phpspec-prophecy-1.7.2-c9b8c60.tgz) = a3c2faf00e00b430676b639c94097b2f0bb0e9e276b5e5f56f9d480feccede6221c28672074f7c9a70fb70c80674975c3797e3db2d76a5f18daa6f3058097ad6 From d50c6d95678e9cb8c8a49cbb1894fc2155f70560 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Nov 2017 11:22:11 +0100 Subject: [PATCH 3/3] v1.7.3 (cherry picked from commit 510ca073d3bd4078138b06323cc9e792ad14341a) --- .gitignore | 1 + php-phpspec-prophecy.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 6acb2f0..704c7be 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ clog /prophecy-1.7.0-93d39f1.tar.gz /php-phpspec-prophecy-1.7.1-15ea9ac.tgz /php-phpspec-prophecy-1.7.2-c9b8c60.tgz +/php-phpspec-prophecy-1.7.3-e4ed002.tgz diff --git a/php-phpspec-prophecy.spec b/php-phpspec-prophecy.spec index 9385458..68b2541 100644 --- a/php-phpspec-prophecy.spec +++ b/php-phpspec-prophecy.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6 +%global gh_commit e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpspec %global gh_project prophecy @@ -19,7 +19,7 @@ %endif Name: php-phpspec-prophecy -Version: 1.7.2 +Version: 1.7.3 Release: 1%{?dist} Summary: Highly opinionated mocking framework for PHP @@ -36,7 +36,7 @@ BuildArch: noarch %if %{with_tests} # from composer.json, "require-dev": { # "phpspec/phpspec": "^2.5|^3.2" -# "phpunit/phpunit": "^4.8 || ^5.6.5" +# "phpunit/phpunit": "^4.8.35 || ^5.7" BuildRequires: php-composer(phpspec/phpspec) >= 2.5 # Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -124,6 +124,9 @@ exit $ret %changelog +* Mon Nov 27 2017 Remi Collet - 1.7.3-1 +- Update to 1.7.3 + * Tue Sep 5 2017 Remi Collet - 1.7.2-1 - Update to 1.7.2 diff --git a/sources b/sources index d815eee..292d426 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-phpspec-prophecy-1.7.2-c9b8c60.tgz) = a3c2faf00e00b430676b639c94097b2f0bb0e9e276b5e5f56f9d480feccede6221c28672074f7c9a70fb70c80674975c3797e3db2d76a5f18daa6f3058097ad6 +SHA512 (php-phpspec-prophecy-1.7.3-e4ed002.tgz) = f2dd8f7162c400683c88acc9dc276291495e0d2bb4b486dc7c96219e23f22e8a08924c250d708ea5502c07aae6e157a3737628952c9e333dba143518330eb3b7