Skip to content

Commit 447acec

Browse files
committedJun 30, 2016
php-ocramius-proxy-manager: fix version + patch
1 parent 0df4113 commit 447acec

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed
 
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
NAME=$(basename $PWD)
4+
OWNER=$(sed -n '/^%global github_owner/{s/.* //;p}' $NAME.spec)
5+
PROJECT=$(sed -n '/^%global github_name/{s/.* //;p}' $NAME.spec)
6+
VERSION=$(sed -n '/^%global github_version/{s/.* //;p}' $NAME.spec)
7+
COMMIT=$(sed -n '/^%global github_commit/{s/.* //;p}' $NAME.spec)
8+
SHORT=${COMMIT:0:7}
9+
10+
echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n"
11+
12+
echo "Cloning..."
13+
rm -rf $PROJECT-$COMMIT
14+
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
15+
16+
echo "Getting commit..."
17+
pushd $PROJECT-$COMMIT
18+
git checkout $COMMIT
19+
cp composer.json ../composer.json
20+
popd
21+
22+
echo "Archiving..."
23+
tar czf $NAME-$VERSION-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
24+
25+
echo "Cleaning..."
26+
rm -rf $PROJECT-$COMMIT
27+
28+
echo "Done."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff -up src/ProxyManager/Version.php.rpm src/ProxyManager/Version.php
2+
--- src/ProxyManager/Version.php.rpm 2016-06-29 16:37:55.000000000 +0200
3+
+++ src/ProxyManager/Version.php 2016-06-29 16:38:44.000000000 +0200
4+
@@ -20,8 +20,6 @@ declare(strict_types=1);
5+
6+
namespace ProxyManager;
7+
8+
-use PackageVersions\Versions;
9+
-
10+
/**
11+
* Version class - to be adjusted when a new release is created.
12+
*
13+
@@ -47,6 +45,6 @@ final class Version
14+
*/
15+
public static function getVersion() : string
16+
{
17+
- return Versions::getVersion('ocramius/proxy-manager');
18+
+ return '@VERSION@@@COMMIT@';
19+
}
20+
}

‎php/php-ocramius-proxy-manager/php-ocramius-proxy-manager.spec

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
%global github_owner Ocramius
1414
%global github_name ProxyManager
15-
%global github_version 2.0.0
15+
%global github_version 2.0.2
1616
%global github_commit 001e730968f17cb36816ad68914994341d16e029
1717
%global github_short %(c=%{github_commit}; echo ${c:0:7})
1818

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

145145

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

0 commit comments

Comments
 (0)
Please sign in to comment.