-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
php-ocramius-proxy-manager: fix version + patch
- Loading branch information
1 parent
0df4113
commit 447acec
Showing
3 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |
20 changes: 20 additions & 0 deletions
20
php/php-ocramius-proxy-manager/php-ocramius-proxy-manager-rpm.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters