diff options
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | composer.json | 72 | ||||
l--------- | makesrc.sh | 1 | ||||
-rwxr-xr-x | php-consolidation-annotated-command-get-source.sh | 74 | ||||
-rw-r--r-- | php-consolidation-annotated-command.spec | 38 |
5 files changed, 169 insertions, 30 deletions
@@ -1,6 +1,8 @@ -/php-consolidation-annotated-command-1.0.1-ed279df30b9386fd8e523003dc679421a87c52e0.tar.gz -/php-consolidation-annotated-command-1.2.1-296b4f507b1e184a28c9969bc7ae779f689db5ee.tar.gz -/php-consolidation-annotated-command-2.0.1-2a6ef0b39ed904dabefd796eeaf5f8feeaa881c4.tar.gz -/php-consolidation-annotated-command-2.2.2-1f1d92807f72901e049e9df048b412c3bc3652c9.tar.gz -/php-consolidation-annotated-command-2.4.4-ccff73e46582a885ce4bb2c57bbd8ba4415dbd24.tar.gz -/php-consolidation-annotated-command-2.4.8-6672ea38212f8bffb71fec7eadc8b3372154b17e.tar.gz +clog +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json index f4dc5c0..27e7f7e 100644 --- a/composer.json +++ b/composer.json @@ -19,29 +19,85 @@ } }, "require": { - "php": ">=5.4.0", - "consolidation/output-formatters": "^3.1.10", + "php": ">=5.4.5", + "consolidation/output-formatters": "^3.4", "psr/log": "^1", - "symfony/console": "^2.8|~3", - "symfony/event-dispatcher": "^2.5|^3", - "symfony/finder": "^2.5|^3", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0" + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "phpunit/phpunit": "^4.8", - "satooshi/php-coveralls": "^1.0", + "phpunit/phpunit": "^6", + "php-coveralls/php-coveralls": "^1", + "g1a/composer-test-scenarios": "^3", "squizlabs/php_codesniffer": "^2.7" }, + "config": { + "optimize-autoloader": true, + "sort-packages": true, + "platform": { + "php": "7.0.8" + } + }, "scripts": { "cs": "phpcs --standard=PSR2 -n src", "cbf": "phpcbf --standard=PSR2 -n src", "unit": "SHELL_INTERACTIVE=true phpunit --colors=always", + "lint": [ + "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l" + ], "test": [ + "@lint", "@unit", "@cs" ] }, "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "2.x-dev" } diff --git a/makesrc.sh b/makesrc.sh new file mode 120000 index 0000000..4310807 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1 @@ +php-consolidation-annotated-command-get-source.sh
\ No newline at end of file diff --git a/php-consolidation-annotated-command-get-source.sh b/php-consolidation-annotated-command-get-source.sh new file mode 100755 index 0000000..ce6064d --- /dev/null +++ b/php-consolidation-annotated-command-get-source.sh @@ -0,0 +1,74 @@ +#/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 + cp composer.json ${SPEC_DIR} + 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-consolidation-annotated-command.spec b/php-consolidation-annotated-command.spec index 55e1d8c..eea55ed 100644 --- a/php-consolidation-annotated-command.spec +++ b/php-consolidation-annotated-command.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-consolidation-annotated-command # -# Copyright (c) 2016-2018 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2016-2019 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -10,18 +10,18 @@ # Please preserve changelog entries # -%global github_owner consolidation-org +%global github_owner consolidation %global github_name annotated-command -%global github_version 2.8.3 -%global github_commit 8f8f5da2ca06fbd3a85f7d551c49f844b7c59437 +%global github_version 2.12.0 +%global github_commit 512a2e54c98f3af377589de76c43b24652bcb789 %global composer_vendor consolidation %global composer_project annotated-command -# "php": ">=5.4.0" -%global php_min_ver 5.4.0 -# "consolidation/output-formatters": "^3.1.12" -%global consolidation_output_formatters_min_ver 3.1.12 +# "php": ">=5.4.5" +%global php_min_ver 5.4.5 +# "consolidation/output-formatters": "^3.4" +%global consolidation_output_formatters_min_ver 3.4 %global consolidation_output_formatters_max_ver 4 # "psr/log": "^1" # NOTE: Min version not 1.0 because autoloader required @@ -47,10 +47,13 @@ Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Initialize Symfony Console commands from annotated command class methods -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 + +# GitHub export does not include tests +# Run php-consolidation-annotated-command-get-source.sh to create full source +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh BuildArch: noarch # Tests @@ -74,7 +77,7 @@ BuildRequires: php-composer(symfony/console) < %{symfony_max_ver} BuildRequires: php-composer(symfony/event-dispatcher) < %{symfony_max_ver} BuildRequires: php-composer(symfony/finder) < %{symfony_max_ver} %endif -## phpcompatinfo (computed from version 2.8.3) +## phpcompatinfo (computed from version 2.12.0) BuildRequires: php-dom BuildRequires: php-pcre BuildRequires: php-reflection @@ -100,7 +103,7 @@ Requires: php-composer(symfony/console) < %{symfony_max_ver} Requires: php-composer(symfony/event-dispatcher) < %{symfony_max_ver} Requires: php-composer(symfony/finder) < %{symfony_max_ver} %endif -# phpcompatinfo (computed from version 2.8.3) +# phpcompatinfo (computed from version 2.12.0) Requires: php-dom Requires: php-pcre Requires: php-reflection @@ -156,8 +159,8 @@ AUTOLOAD %install -mkdir -p %{buildroot}%{phpdir}/Consolidation/AnnotatedCommand -cp -rp src/* %{buildroot}%{phpdir}/Consolidation/AnnotatedCommand/ +mkdir -p %{buildroot}%{phpdir}/Consolidation +cp -rp src %{buildroot}%{phpdir}/Consolidation/AnnotatedCommand %check @@ -171,7 +174,7 @@ BOOTSTRAP : Skip test known to fail sed 's/function testInteractAndValidate/function SKIP_testInteractAndValidate/' \ - -i tests/testAnnotatedCommandFactory.php + -i tests/AnnotatedCommandFactoryTest.php : Update tests if symfony/var-dumper is installed if \ @@ -184,7 +187,7 @@ fi : Upstream tests RETURN_CODE=0 -for PHP_EXEC in php %{?rhel:php55} php56 php70 php71 php72; do +for PHP_EXEC in php %{?rhel:php55 php56 php70} php71 php72 php73 php74; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC %{_bindir}/phpunit --verbose --bootstrap bootstrap.php \ || RETURN_CODE=1 @@ -206,6 +209,9 @@ exit $RETURN_CODE %changelog +* Sat Jun 01 2019 Shawn Iwinski <shawn@iwin.ski> - 2.12.0-1 +- Update to 2.12.0 (RHBZ #1582689) + * Fri Mar 30 2018 Shawn Iwinski <shawn@iwin.ski> - 2.8.3-1 - Update to 2.8.3 (RHBZ #1492447) - Add range version dependencies for Fedora >= 27 || RHEL >= 8 |