summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json2
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-phar-io-version3.spec19
3 files changed, 41 insertions, 8 deletions
diff --git a/composer.json b/composer.json
index afa7bb6..22687dc 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
"issues": "https://github.com/phar-io/version/issues"
},
"require": {
- "php": "^7.2"
+ "php": "^7.2 || ^8.0"
},
"autoload": {
"classmap": [
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..4190c13
--- /dev/null
+++ b/makesrc.sh
@@ -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."
diff --git a/php-phar-io-version3.spec b/php-phar-io-version3.spec
index f01f5da..64b61f2 100644
--- a/php-phar-io-version3.spec
+++ b/php-phar-io-version3.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
%global bootstrap 0
-%global gh_commit d06a5000ac1a258a7d035295f0bd4ae7c859bc4f
+%global gh_commit c6bb6825def89e0a32220f88337f8ceaf1975fa0
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phar-io
%global gh_project version
@@ -18,26 +18,27 @@
%global major 3
%global php_home %{_datadir}/php
%if %{bootstrap}
-%global with_tests 0%{?_with_tests:1}
+%bcond_with tests
%else
-%global with_tests 0%{!?_without_tests:1}
+%bcond_without tests
%endif
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 3.0.1
+Version: 3.0.2
Release: 1%{?dist}
Summary: Library for handling version information and constraints
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.2
BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
-%if %{with_tests}
+%if %{with tests}
BuildRequires: phpunit8
%endif
@@ -74,7 +75,7 @@ cp -pr src %{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}
%check
-%if %{with_tests}
+%if %{with tests}
: Run upstream test suite
ret=0
BS=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
@@ -99,6 +100,10 @@ exit $ret
%changelog
+* Mon Jun 29 2020 Remi Collet <remi@remirepo.net> - 3.0.2-1
+- update to 3.0.2 (no change)
+- sources from git snapshot
+
* Mon May 11 2020 Remi Collet <remi@remirepo.net> - 3.0.1-1
- update to 3.0.1