From b512acdc26cd5f512c7f44c8a781d755da8f6cdf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 12 Nov 2019 11:24:01 +0100 Subject: - update to 1.42.4 - sources from git snapshot --- .gitignore | 2 +- makesrc.sh | 28 ++++++++++++++++++++++++++++ php-twig.spec | 12 +++++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100755 makesrc.sh diff --git a/.gitignore b/.gitignore index d820c84..68787b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -*.tar.gz +*.tgz *.src.rpm diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..97be9f6 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global github_owner/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global github_name/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^%global github_version/{s/.* //;p}' $NAME.spec) +COMMIT=$(sed -n '/^%global github_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 $PROJECT-$COMMIT + +echo "Cleaning..." +rm -rf $PROJECT-$COMMIT + +echo "Done." diff --git a/php-twig.spec b/php-twig.spec index 31ab782..4e8a4d4 100644 --- a/php-twig.spec +++ b/php-twig.spec @@ -13,8 +13,9 @@ %global github_owner twigphp %global github_name Twig -%global github_version 1.42.3 -%global github_commit 201baee843e0ffe8b0b956f336dd42b2a92fae4e +%global github_version 1.42.4 +%global github_commit e587180584c3d2d6cb864a0454e777bb6dcb6152 +%global github_short %(c=%{github_commit}; echo ${c:0:7}) # Lib %global composer_vendor twig @@ -36,7 +37,8 @@ Summary: The flexible, fast, and secure template engine for PHP License: BSD URL: http://twig.sensiolabs.org -Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +Source0: %{name}-%{github_version}-%{github_short}.tgz +Source1: makesrc.sh BuildArch: noarch BuildRequires: php-devel >= %{php_min_ver} @@ -184,6 +186,10 @@ exit $ret %changelog +* Tue Nov 12 2019 Remi Collet - 1.42.4-1 +- update to 1.42.4 +- sources from git snapshot + * Tue Aug 27 2019 Remi Collet - 1.42.3-1 - update to 1.42.3 - use symfony/debug v3 -- cgit