update to 2.0.1
sources from git snapshot run upstream test suite
This commit is contained in:
parent
5485662d25
commit
09366ae32a
4 changed files with 66 additions and 9 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/php-phpunit-php-text-template2-2.0.0-526dc99.tar.gz
|
||||
/php-phpunit-php-text-template2-2.0.1-0c69cbf.tgz
|
||||
|
|
|
|||
28
makesrc.sh
Executable file
28
makesrc.sh
Executable file
|
|
@ -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-vcs --exclude tools $PROJECT-$COMMIT
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
|
||||
echo "Done."
|
||||
|
|
@ -6,7 +6,8 @@
|
|||
#
|
||||
# Please, preserve the changelog entries
|
||||
#
|
||||
%global gh_commit 526dc996cc0ebdfa428cd2dfccd79b7b53fee346
|
||||
%global bootstrap 0
|
||||
%global gh_commit 0c69cbf965d5317ba33f24a352539f354a25db09
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_owner sebastianbergmann
|
||||
%global gh_project php-text-template
|
||||
|
|
@ -19,19 +20,31 @@
|
|||
%global php_home %{_datadir}/php
|
||||
%global ver_major 2
|
||||
|
||||
%if %{bootstrap}
|
||||
%global with_tests 0%{?_with_tests:1}
|
||||
%else
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
%endif
|
||||
|
||||
Name: php-%{pk_vendor}-%{pk_project}%{ver_major}
|
||||
Version: 2.0.0
|
||||
Version: 2.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple template engine
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/%{gh_owner}/%{gh_project}
|
||||
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
|
||||
Source0: %{name}-%{version}-%{gh_short}.tgz
|
||||
Source1: makesrc.sh
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: php(language) >= 7.3
|
||||
BuildRequires: php-cli
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
%if %{with_tests}
|
||||
# From composer.json, require-dev
|
||||
# "phpunit/phpunit": "^9.0"
|
||||
BuildRequires: phpunit9
|
||||
%endif
|
||||
|
||||
# From composer.json
|
||||
# "php": "^7.3"
|
||||
|
|
@ -60,12 +73,22 @@ mkdir -p %{buildroot}%{php_home}/%{ns_vendor}
|
|||
cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}
|
||||
|
||||
|
||||
%if %{with_tests}
|
||||
%check
|
||||
: check autoloader
|
||||
php -r '
|
||||
require "%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php";
|
||||
exit (class_exists("%{ns_vendor}\\%{ns_project}\\Template") ? 0 : 1);
|
||||
'
|
||||
: Generate tests autoloader
|
||||
mkdir vendor
|
||||
%{_bindir}/phpab --output vendor/autoload.php tests
|
||||
|
||||
: Run upstream test suite
|
||||
ret=0
|
||||
for cmd in php php73 php74 php80; do
|
||||
if which $cmd; then
|
||||
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{ver_major}/autoload.php \
|
||||
%{_bindir}/phpunit9 --verbose || ret=1
|
||||
fi
|
||||
done
|
||||
exit $ret
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
|
|
@ -77,6 +100,11 @@ exit (class_exists("%{ns_vendor}\\%{ns_project}\\Template") ? 0 : 1);
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Jun 16 2020 Remi Collet <remi@remirepo.net> - 2.0.1-1
|
||||
- update to 2.0.1
|
||||
- sources from git snapshot
|
||||
- run upstream test suite
|
||||
|
||||
* Fri Feb 7 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
|
||||
- update to 2.0.0
|
||||
- raise dependency on PHP 7.3
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (php-phpunit-php-text-template2-2.0.0-526dc99.tar.gz) = 57532b34c4eaa9ad737a3be5e4c2805f90b6847049fd5601724042ec17a1ea19c300fed011354c2a20971d4f298df2fdf96e2c4751a22ce49d5ac30120c5e9eb
|
||||
SHA512 (php-phpunit-php-text-template2-2.0.1-0c69cbf.tgz) = 42521824d3cd084b23dc47ee55cecd8806878386477d4b165086dee52b06c23422661954c671bd089564452ee1e34735e071223e4defc9fc31d938208dcff2c2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue