summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-10-18 11:17:16 +0200
committerRemi Collet <fedora@famillecollet.com>2015-10-18 11:17:16 +0200
commit589e58da76f99766fd127d777f9229d6ac9fc6d5 (patch)
tree09127a0e0386b63a7861593bb5f8d67d2f84ba7a
parentcae180c2bfc2d5c298152d9c32cea3626e050c03 (diff)
php-zendframework-zend-diactoros: 1.1.4
-rwxr-xr-xmakesrc.sh28
-rwxr-xr-xphp-zendframework-zend-diactoros-get-source.sh69
-rw-r--r--php-zendframework-zend-diactoros.spec12
3 files changed, 36 insertions, 73 deletions
diff --git a/makesrc.sh b/makesrc.sh
new file mode 100755
index 0000000..1c6057e
--- /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-$VERSION.json
+popd
+
+echo "Archiving..."
+tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
+
+echo "Cleaning..."
+rm -rf $PROJECT-$COMMIT
+
+echo "Done."
diff --git a/php-zendframework-zend-diactoros-get-source.sh b/php-zendframework-zend-diactoros-get-source.sh
deleted file mode 100755
index 843c93c..0000000
--- a/php-zendframework-zend-diactoros-get-source.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#/bin/sh
-
-GIT=`which git`
-RPM=`which rpm`
-
-if [ -z "$GIT" ]
-then
- echo "ERROR: 'git' command not found" 1>&2
- exit 1
-elif [ -z "$RPM" ]
-then
- echo "ERROR: 'rpm' command not found" 1>&2
- exit 1
-fi
-
-function print {
- echo -e "\e[0;33m>>>>> ${1}\e[0m"
-}
-
-if [ -x "$1" ]
-then
- SPEC=$1
-else
- SPEC=`ls *.spec | head -1`
-fi
-
-NAME=`echo $SPEC | sed 's#\.spec##'`
-VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
-
-print "SPEC = $SPEC"
-print "NAME = $NAME"
-
-GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
-GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
-GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
-GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
-GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
-
-print "GIT_OWNER = $GIT_OWNER"
-print "GIT_NAME = $GIT_NAME"
-print "GIT_COMMIT = $GIT_COMMIT"
-print "GIT_REPO = $GIT_REPO"
-print "GIT_DIR = $GIT_DIR"
-
-TEMP_DIR=$(mktemp --dir)
-
-TAR_FILE=$PWD/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
-pushd $TEMP_DIR
- print "Cloning git repo..."
- $GIT clone $GIT_REPO
-
- pushd $GIT_DIR
- print "Checking out commit..."
- $GIT checkout $GIT_COMMIT
- popd
-
- TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
- print "TAR_DIR = $TAR_DIR"
-
- mv $GIT_DIR $TAR_DIR
-
- print "TAR_FILE = $TAR_FILE"
-
- [ -e $TAR_FILE ] && rm -f $TAR_FILE
- tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
- chmod 0644 $TAR_FILE
-popd
-
-rm -rf $TEMP_DIR
diff --git a/php-zendframework-zend-diactoros.spec b/php-zendframework-zend-diactoros.spec
index b8a70e3..dc86792 100644
--- a/php-zendframework-zend-diactoros.spec
+++ b/php-zendframework-zend-diactoros.spec
@@ -12,8 +12,9 @@
%global github_owner zendframework
%global github_name zend-diactoros
-%global github_version 1.1.3
-%global github_commit e2f5c12916c74da384058d0dfbc7fbc0b03d1181
+%global github_version 1.1.4
+%global github_commit 3f0ce6c0ba2106e018fb514a9f09dbb91eb6bfd0
+%global github_short %(c=%{github_commit}; echo ${c:0:7})
%global composer_vendor zendframework
%global composer_project zend-diactoros
@@ -40,8 +41,8 @@ URL: https://github.com/%{github_owner}/%{github_name}
# GitHub export does not include tests.
# Run php-zendframework-zend-diactoros-get-source.sh to create full source.
-Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
-Source1: %{name}-get-source.sh
+Source0: %{name}-%{github_version}-%{github_short}.tgz
+Source1: makesrc.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -169,6 +170,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Oct 18 2015 Remi Collet <remi@remirepo.net> - 1.1.4-1
+- update to 1.1.4
+
* Tue Aug 11 2015 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.1.3-1
- Updated to 1.1.3 (RHBZ #1252195)
- Updated autoloader to load dependencies after self registration