diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | makesrc.sh | 28 | ||||
-rw-r--r-- | php-twig.spec | 12 |
3 files changed, 38 insertions, 4 deletions
@@ -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 <remi@remirepo.net> - 1.42.4-1 +- update to 1.42.4 +- sources from git snapshot + * Tue Aug 27 2019 Remi Collet <remi@remirepo.net> - 1.42.3-1 - update to 1.42.3 - use symfony/debug v3 |