summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-10-21 14:02:41 +0200
committerRemi Collet <remi@php.net>2021-10-21 14:02:41 +0200
commitfea4ff4ca2d33f21368a4cdc8c20afcd39f3df36 (patch)
treefe223178282c7e8972a03dc52204a6a68b09f468
parentd693b1d7f305814b347c01f89936623b95aab679 (diff)
update to 1.3.0
switch to phpunit9
-rw-r--r--composer.json20
l---------makesrc.sh1
-rwxr-xr-xphp-react-promise-stream-get-sources.sh73
-rw-r--r--php-react-promise-stream.spec21
4 files changed, 107 insertions, 8 deletions
diff --git a/composer.json b/composer.json
index 7fe0bc3..ee3972c 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,23 @@
"authors": [
{
"name": "Christian Lück",
- "email": "christian@lueck.tv"
+ "homepage": "https://clue.engineering/",
+ "email": "christian@clue.engineering"
+ },
+ {
+ "name": "Cees-Jan Kiewiet",
+ "homepage": "https://wyrihaximus.net/",
+ "email": "reactphp@ceesjankiewiet.nl"
+ },
+ {
+ "name": "Jan Sorgalla",
+ "homepage": "https://sorgalla.com/",
+ "email": "jsorgalla@gmail.com"
+ },
+ {
+ "name": "Chris Boden",
+ "homepage": "https://cboden.dev/",
+ "email": "cboden@gmail.com"
}
],
"autoload": {
@@ -26,6 +42,6 @@
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3",
"react/promise-timer": "^1.0",
"clue/block-react": "^1.0",
- "phpunit/phpunit": "^7.0 || ^6.4 || ^5.7 || ^4.8.35"
+ "phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
}
}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 120000
index 0000000..9fe52eb
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1 @@
+php-react-promise-stream-get-sources.sh \ No newline at end of file
diff --git a/php-react-promise-stream-get-sources.sh b/php-react-promise-stream-get-sources.sh
new file mode 100755
index 0000000..b2ac62b
--- /dev/null
+++ b/php-react-promise-stream-get-sources.sh
@@ -0,0 +1,73 @@
+#/bin/sh
+
+GIT=`which git`
+RPM=`which rpm`
+
+if [ -z "$GIT" ]
+then
+ echo "ERROR: 'git' command not found" 1>&2
+ exit 1
+elif [ -z "$RPM" ]
+then
+ echo "ERROR: 'rpm' command not found" 1>&2
+ exit 1
+fi
+
+function print {
+ echo -e "\e[0;33m>>>>> ${1}\e[0m"
+}
+
+if [ -x "$1" ]
+then
+ SPEC=$1
+else
+ SPEC=`ls *.spec | head -1`
+fi
+
+SPEC_DIR=`pwd`
+
+print "SPEC_DIR = $SPEC_DIR"
+
+NAME=`echo $SPEC | sed 's#\.spec##'`
+VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
+
+print "SPEC = $SPEC"
+print "NAME = $NAME"
+
+GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
+GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
+GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
+GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
+GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
+
+print "GIT_OWNER = $GIT_OWNER"
+print "GIT_NAME = $GIT_NAME"
+print "GIT_COMMIT = $GIT_COMMIT"
+print "GIT_REPO = $GIT_REPO"
+print "GIT_DIR = $GIT_DIR"
+
+TEMP_DIR=$(mktemp --dir)
+
+pushd $TEMP_DIR
+ print "Cloning git repo..."
+ $GIT clone $GIT_REPO
+
+ pushd $GIT_DIR
+ print "Checking out commit..."
+ $GIT checkout $GIT_COMMIT
+ popd
+
+ TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
+ print "TAR_DIR = $TAR_DIR"
+
+ mv $GIT_DIR $TAR_DIR
+
+ TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+ print "TAR_FILE = $TAR_FILE"
+
+ [ -e $TAR_FILE ] && rm -f $TAR_FILE
+ tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
+ chmod 0644 $TAR_FILE
+popd
+
+rm -rf $TEMP_DIR
diff --git a/php-react-promise-stream.spec b/php-react-promise-stream.spec
index 5730c60..c548027 100644
--- a/php-react-promise-stream.spec
+++ b/php-react-promise-stream.spec
@@ -12,8 +12,8 @@
%global github_owner reactphp
%global github_name promise-stream
-%global github_version 1.2.0
-%global github_commit 6384d8b76cf7dcc44b0bf3343fb2b2928412d1fe
+%global github_version 1.3.0
+%global github_commit 3ebd94fe0d8edbf44937948af28d02d5437e9949
%global composer_vendor react
%global composer_project promise-stream
@@ -48,14 +48,18 @@ Summary: The missing link between Promise-land and Stream-land for ReactPH
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+
+# GitHub export does not include tests
+# Run php-react-stream-get-source.sh to create full source
+Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
+Source1: %{name}-get-sources.sh
BuildArch: noarch
# Tests
%if %{with_tests}
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: phpunit7
+BuildRequires: phpunit9 >= 9.3
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(clue/block-react) >= %{clue_block_react_min_ver} with php-composer(clue/block-react) < %{clue_block_react_max_ver})
BuildRequires: (php-composer(react/event-loop) >= %{react_event_loop_min_ver} with php-composer(react/event-loop) < %{react_event_loop_max_ver})
@@ -155,8 +159,9 @@ BOOTSTRAP
: Upstream tests
RETURN_CODE=0
-PHPUNIT=$(which phpunit7)
-for PHP_EXEC in "" php71 php72 php73 php74; do
+PHPUNIT=$(which phpunit9)
+# TODO PHP 8
+for PHP_EXEC in "" php73 php74 php80 php81; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -177,6 +182,10 @@ exit $RETURN_CODE
%changelog
+* Thu Oct 21 2021 Remi Collet <remi@remirepo.net> - 1.3.0-1
+- update to 1.3.0
+- switch to phpunit9
+
* Sat Dec 14 2019 Shawn Iwinski <shawn@iwin.ski> - 1.2.0-1
- Update to 1.2.0 (RHBZ #1783720)
- Use PHPUnit 7