summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-05-20 07:15:53 +0200
committerRemi Collet <remi@php.net>2026-05-20 07:15:53 +0200
commit44393d80455f8b2b789e67166569c479f1ba4ec8 (patch)
tree499052650d286d5bd2f2e725af23108af96c987f
parent085de11c3ab7f9a756709450ff01a23add7f7f47 (diff)
update to 5.0.1HEADmaster
raise dependency on nikic/php-parser 5.7.0
-rw-r--r--composer.json4
-rwxr-xr-xmakesrc.sh26
-rw-r--r--php-sebastian-lines-of-code5.spec25
3 files changed, 24 insertions, 31 deletions
diff --git a/composer.json b/composer.json
index 2275c29..82e403c 100644
--- a/composer.json
+++ b/composer.json
@@ -18,10 +18,10 @@
"prefer-stable": true,
"require": {
"php": ">=8.4",
- "nikic/php-parser": "^5.0"
+ "nikic/php-parser": "^5.7.0"
},
"require-dev": {
- "phpunit/phpunit": "^13.0"
+ "phpunit/phpunit": "^13.1.10"
},
"config": {
"platform": {
diff --git a/makesrc.sh b/makesrc.sh
index ac0c720..59cf430 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -1,35 +1,27 @@
#!/bin/bash
NAME=$(basename $PWD)
-DATE=$(sed -n '/^%global gh_date/{s/.* //;p}' $NAME.spec)
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}
-DATE=$(date -d "$DATE -4 days" +%Y-%m-%d)
-
-if [ -f $NAME-$VERSION-$SHORT.tgz ]; then
- echo "$NAME-$VERSION-$SHORT.tgz already there"
+if [ -f $NAME-$VERSION.tgz ]; then
+ echo "$NAME-$VERSION.tgz already there"
else
- echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Date=$DATE\n"
+ echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION \n"
echo "Cloning..."
- rm -rf $PROJECT-$COMMIT
- git clone --shallow-since=$DATE https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT || exit 1
+ rm -rf $PROJECT-$VERSION
+ git clone https://github.com/$OWNER/$PROJECT.git --depth 1 --branch $VERSION $PROJECT-$VERSION || exit 1
- echo "Getting commit..."
- pushd $PROJECT-$COMMIT
- git checkout $COMMIT || exit 1
- cp composer.json ../composer.json
- popd
+ echo "Getting composer..."
+ cp $PROJECT-$VERSION/composer.json composer.json
echo "Archiving..."
- tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs --exclude tools $PROJECT-$COMMIT
+ tar czf $NAME-$VERSION.tgz --exclude-vcs --exclude tools $PROJECT-$VERSION
echo "Cleaning..."
- rm -rf $PROJECT-$COMMIT
+ rm -rf $PROJECT-$VERSION
echo "Done."
fi
diff --git a/php-sebastian-lines-of-code5.spec b/php-sebastian-lines-of-code5.spec
index afaf9ca..f03e5cc 100644
--- a/php-sebastian-lines-of-code5.spec
+++ b/php-sebastian-lines-of-code5.spec
@@ -10,11 +10,8 @@
%bcond_without tests
# github
-%global gh_commit 4f21bb7768e1c997722ccc7efb1d6b5c11bfd471
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project lines-of-code
-%global gh_date 2026-02-06
# packagist
%global pk_vendor sebastian
%global pk_project %{gh_project}
@@ -25,32 +22,32 @@
%global ns_project LinesOfCode
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 5.0.0
-Release: 2%{?dist}
+Version: 5.0.1
+Release: 1%{?dist}
Summary: Counting the lines of code in PHP source code, version %{major}
License: BSD-3-Clause
URL: https://github.com/%{gh_owner}/%{gh_project}
# run makesrc.sh to create a git snapshot with test suite
-Source0: %{name}-%{version}-%{gh_short}.tgz
+Source0: %{name}-%{version}.tgz
Source1: makesrc.sh
BuildArch: noarch
BuildRequires: php(language) >= 8.4.1
-BuildRequires: (php-composer(nikic/php-parser) >= 5.0 with php-composer(nikic/php-parser) < 6)
+BuildRequires: (php-composer(nikic/php-parser) >= 5.7.0 with php-composer(nikic/php-parser) < 6)
# Autoloader
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
%if %{with tests}
# from composer.json, "require-dev": {
-# "phpunit/phpunit": "^13.0"
-BuildRequires: phpunit13
+# "phpunit/phpunit": "^13.1.10"
+BuildRequires: phpunit13 >= 13.1.10
%endif
# from composer.json, "require": {
# "php": ">=8.4",
-# "nikic/php-parser": "^5.0"
+# "nikic/php-parser": "^5.7.0"
Requires: php(language) >= 8.4
-Requires: (php-composer(nikic/php-parser) >= 5.0 with php-composer(nikic/php-parser) < 6)
+Requires: (php-composer(nikic/php-parser) >= 5.7.0 with php-composer(nikic/php-parser) < 6)
# from phpcompatinfo report for version 2.0.0
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -67,7 +64,7 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
%prep
-%setup -q -n %{gh_project}-%{gh_commit}
+%setup -q -n %{gh_project}-%{version}
%build
@@ -114,6 +111,10 @@ exit $ret
%changelog
+* Wed May 20 2026 Remi Collet <remi@remirepo.net> - 5.0.1-1
+- update to 5.0.1
+- raise dependency on nikic/php-parser 5.7.0
+
* Tue Feb 10 2026 Remi Collet <remi@remirepo.net> - 5.0.0-2
- enable test suite