summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmakesrc.sh58
-rwxr-xr-xmakesrc2.sh28
-rw-r--r--php-cakephp4.spec17
3 files changed, 53 insertions, 50 deletions
diff --git a/makesrc.sh b/makesrc.sh
index 87d223d..5d491dc 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -7,22 +7,52 @@ 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"
+if [ -f $NAME-$VERSION-$SHORT.tgz ]; then
+ echo skip $NAME-$VERSION-$SHORT.tgz
+else
+ 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 "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 "Getting commit..."
+ pushd $PROJECT-$COMMIT
+ git checkout $COMMIT || exit 1
+ cp composer.json ../composer.json
+ popd
-echo "Archiving..."
-tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+ echo "Archiving..."
+ tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
-echo "Cleaning..."
-rm -rf $PROJECT-$COMMIT
+ echo "Cleaning..."
+ rm -rf $PROJECT-$COMMIT
+fi
+
+PROJECT=chronos
+VERSION=$(sed -n '/^%global chronos_version/{s/.* //;p}' $NAME.spec)
+COMMIT=$(sed -n '/^%global chronos_commit/{s/.* //;p}' $NAME.spec)
+SHORT=${COMMIT:0:7}
+
+if [ -f $NAME-chronos-$VERSION-$SHORT.tgz ]; then
+ echo skip $NAME-chronos-$VERSION-$SHORT.tgz
+else
+ 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 || exit 1
+ cp composer.json ../composer-chronos.json
+ popd
+
+ echo "Archiving..."
+ tar czf $NAME-chronos-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+
+ echo "Cleaning..."
+ rm -rf $PROJECT-$COMMIT
+fi
-echo "Done."
diff --git a/makesrc2.sh b/makesrc2.sh
deleted file mode 100755
index 8cdfb70..0000000
--- a/makesrc2.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/bash
-
-NAME=$(basename $PWD)
-OWNER=$(sed -n '/^%global gh_owner/{s/.* //;p}' $NAME.spec)
-PROJECT=chronos
-VERSION=$(sed -n '/^%global chronos_version/{s/.* //;p}' $NAME.spec)
-COMMIT=$(sed -n '/^%global chronos_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-chronos.json
-popd
-
-echo "Archiving..."
-tar czf $NAME-chronos-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
-
-echo "Cleaning..."
-rm -rf $PROJECT-$COMMIT
-
-echo "Done."
diff --git a/php-cakephp4.spec b/php-cakephp4.spec
index a230005..edf2437 100644
--- a/php-cakephp4.spec
+++ b/php-cakephp4.spec
@@ -23,21 +23,20 @@
%global major 4
# https://github.com/cakephp/chronos/releases
-%global chronos_commit 5929b743aec34b3a2f74c70c383706f7f12e2725
+%global chronos_commit 1d187c71587c97520c00491f626e0f255144953e
%global chronos_short %(c=%{chronos_commit}; echo ${c:0:7})
-%global chronos_version 2.1.1
+%global chronos_version 2.1.2
Name: php-%{pk_vendor}%{major}
Version: 4.2.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The CakePHP framework
License: MIT
URL: https://cakephp.org/
Source0: %{name}-%{version}-%{gh_short}.tgz
-Source1: makesrc.sh
-Source2: %{name}-chronos-%{chronos_version}-%{chronos_short}.tgz
-Source3: makesrc2.sh
+Source1: %{name}-chronos-%{chronos_version}-%{chronos_short}.tgz
+Source2: makesrc.sh
BuildArch: noarch
BuildRequires: php-cli
@@ -603,7 +602,7 @@ that can validate arbitrary arrays of data with ease.
%prep
-%setup -q -n %{gh_project}-%{gh_commit} -a 2
+%setup -q -n %{gh_project}-%{gh_commit} -a 1
mv chronos-*/src src/Chronos
mv chronos-*/tests tests2
@@ -953,7 +952,6 @@ export LANG=fr_FR.UTF-8
ret=0
: Run chronos test suite
%{_bindir}/phpunit8 tests2 \
- --filter '^((?!(testDiffInMonthsIgnoreTimezone)).)*$' \
--verbose || ret=1
: Run cakephp test suite
@@ -1132,6 +1130,9 @@ exit $ret
%changelog
+* Wed Apr 7 2021 Remi Collet <remi@remirepo.net> - 4.2.5-2
+- update chronos to 2.1.2
+
* Tue Apr 6 2021 Remi Collet <remi@remirepo.net> - 4.2.5-1
- update to 4.2.5