Skip to content
Permalink
Browse files

php-ocramius-proxy-manager: fix version + patch

  • Loading branch information...
remicollet committed Jun 30, 2016
1 parent 0df4113 commit 447acec68934636395a0e712a18300ba4e147302
@@ -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 .git $PROJECT-$COMMIT

echo "Cleaning..."
rm -rf $PROJECT-$COMMIT

echo "Done."
@@ -0,0 +1,20 @@
diff -up src/ProxyManager/Version.php.rpm src/ProxyManager/Version.php
--- src/ProxyManager/Version.php.rpm 2016-06-29 16:37:55.000000000 +0200
+++ src/ProxyManager/Version.php 2016-06-29 16:38:44.000000000 +0200
@@ -20,8 +20,6 @@ declare(strict_types=1);

namespace ProxyManager;

-use PackageVersions\Versions;
-
/**
* Version class - to be adjusted when a new release is created.
*
@@ -47,6 +45,6 @@ final class Version
*/
public static function getVersion() : string
{
- return Versions::getVersion('ocramius/proxy-manager');
+ return '@VERSION@@@COMMIT@';
}
}
@@ -12,7 +12,7 @@

%global github_owner Ocramius
%global github_name ProxyManager
%global github_version 2.0.0
%global github_version 2.0.2
%global github_commit 001e730968f17cb36816ad68914994341d16e029
%global github_short %(c=%{github_commit}; echo ${c:0:7})

@@ -144,8 +144,8 @@ rm -rf %{buildroot}


%changelog
* Wed Jun 29 2016 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
- update to 2.0.0
* Wed Jun 29 2016 Remi Collet <remi@fedoraproject.org> - 2.0.2-1
- update to 2.0.2
- raise dependency on php 7.0.7
- raise dependency on zendframework/zend-code 3.0

0 comments on commit 447acec

Please sign in to comment.
You can’t perform that action at this time.