summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-sebastian-code-unit.spec11
2 files changed, 36 insertions, 3 deletions
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-sebastian-code-unit.spec b/php-sebastian-code-unit.spec
index 5589e1a..f499830 100644
--- a/php-sebastian-code-unit.spec
+++ b/php-sebastian-code-unit.spec
@@ -8,7 +8,7 @@
#
%global bootstrap 0
# Sources
-%global gh_commit ac958085bc19fcd1d36425c781ef4cbb5b06e2a5
+%global gh_commit d650ef9b1fece15ed4d6eaed6e6b469b7b81183a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project code-unit
@@ -27,13 +27,14 @@
%endif
Name: php-%{pk_vendor}-%{pk_project}%{major}
-Version: 1.0.2
+Version: 1.0.3
Release: 1%{?dist}
Summary: Collection of value objects that represent the PHP code units
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
@@ -119,6 +120,10 @@ exit $ret
%changelog
+* Tue Jun 16 2020 Remi Collet <remi@remirepo.net> - 1.0.3-1
+- update to 1.0.3 (no change)
+- sources from git snapshot
+
* Thu Apr 30 2020 Remi Collet <remi@remirepo.net> - 1.0.2-1
- update to 1.0.2