summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-10-17 11:46:41 +0200
committerRemi Collet <remi@remirepo.net>2019-10-17 11:46:41 +0200
commitcf735558e00642fce1092a37b74bbcaa2b3b444e (patch)
tree6442bc18775a0494419e9d60805d4279a2b6cd2c
parent3352ad2737ddd153ad67b778ea96462f893d2185 (diff)
- update to 2.12.1 (no change)
- sources from git snapshot
-rw-r--r--.gitignore6
-rwxr-xr-xmakesrc.sh28
-rw-r--r--php-twig2.spec11
3 files changed, 42 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index d820c84..fc9aa8c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,8 @@
+clog
+package-*.xml
+*.tgz
*.tar.gz
+*.tar.xz
+*.tar.xz.asc
*.src.rpm
+*/*rpm
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..8036200
--- /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 '/^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-twig2.spec b/php-twig2.spec
index 6c6a8ec..74b34d5 100644
--- a/php-twig2.spec
+++ b/php-twig2.spec
@@ -13,7 +13,7 @@
%global with_tests 0%{!?_without_tests:1}
%global github_owner twigphp
%global github_name Twig
-%global github_commit c7a85fd08348ca04b4d8f234f49583d9910906aa
+%global github_commit ddd4134af9bfc6dba4eff7c8447444ecc45b9ee5
%global github_short %(c=%{github_commit}; echo ${c:0:7})
%global composer_vendor twig
@@ -24,13 +24,14 @@
%global phpdir %{_datadir}/php
Name: php-%{composer_project}2
-Version: 2.12.0
+Version: 2.12.1
Release: 1%{?dist}
Summary: The flexible, fast, and secure template engine for PHP
License: BSD
URL: https://twig.symfony.com
-Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{version}-%{github_short}.tar.gz
+Source0: %{name}-%{version}-%{github_short}.tgz
+Source1: makesrc.sh
BUildArch: noarch
## Autoloader
@@ -182,6 +183,10 @@ exit $RETURN_CODE
%changelog
+* Thu Oct 17 2019 Remi Collet <remi@remirepo.net> - 2.12.1-1
+- update to 2.12.1 (no change)
+- sources from git snapshot
+
* Mon Oct 7 2019 Remi Collet <remi@remirepo.net> - 2.12.0-1
- update to 2.12.0
- use phpunit7 and Symfony 4 for test suite