diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-01-07 10:23:55 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-01-07 10:23:55 +0100 |
commit | 6497f1b8d359131d66c340c9829085814ac60f9a (patch) | |
tree | bc6da7ae8953f53fa60984c0304910c67197684a | |
parent | 39b5ccfc97a303427cc9ad9121992d05c5448284 (diff) |
php-JsonSchema: 1.6.0
-rwxr-xr-x | php-JsonSchema-makesrc.sh | 28 | ||||
-rw-r--r-- | php-JsonSchema.spec | 18 |
2 files changed, 43 insertions, 3 deletions
diff --git a/php-JsonSchema-makesrc.sh b/php-JsonSchema-makesrc.sh new file mode 100755 index 0000000..1c6057e --- /dev/null +++ b/php-JsonSchema-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-$VERSION.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-JsonSchema.spec b/php-JsonSchema.spec index 0db12b7..12f520e 100644 --- a/php-JsonSchema.spec +++ b/php-JsonSchema.spec @@ -12,8 +12,8 @@ %global github_owner justinrainbow %global github_name json-schema -%global github_version 1.5.0 -%global github_commit a4bee9f4b344b66e0a0d96c7afae1e92edf385fe +%global github_version 1.6.0 +%global github_commit f9e27c3e202faf14fd581ef41355d83bb4b7eb7d %global github_short %(c=%{github_commit}; echo ${c:0:7}) %global php_min_ver 5.3.2 @@ -32,9 +32,12 @@ Summary: PHP implementation of JSON schema Group: Development/Libraries License: BSD URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_short}.tar.gz +# Use a git snapshot as upstream remove tests from distribution +Source0: %{name}-%{github_version}-%{github_short}.tgz # Autoloader Source1: %{name}-autoload.php +# Script to pull the git snapshot +Source2: %{name}-makesrc.sh BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -109,6 +112,10 @@ $fedoraClassLoader->addPrefix('%{lib_name}\\Tests\\', realpath(__DIR__.'/../test EOF %{_bindir}/phpunit --verbose + +if which php70; then + php70 %{_bindir}/phpunit --verbose +fi %else : Tests skipped %endif @@ -124,6 +131,11 @@ EOF %changelog +* Thu Jan 7 2016 Remi Collet <remi@fedoraproject.org> - 1.6.0-1 +- update to 1.6.0 +- use a git snapshot as upstream drop tests from distribution +- run test suite with both PHP 5 and 7 when available + * Tue Sep 22 2015 Remi Collet <remi@fedoraproject.org> - 1.5.0-1 - update to 1.5.0 |