Merge pull request #9832 from haberman/php-dist
Fixed PHP release script.
This commit is contained in:
commit
21027a27c4
@ -16,8 +16,8 @@
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Google\\Protobuf\\": "php/src/Google/Protobuf",
|
||||
"GPBMetadata\\Google\\Protobuf\\": "php/src/GPBMetadata/Google/Protobuf"
|
||||
"Google\\Protobuf\\": "src/Google/Protobuf",
|
||||
"GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,24 +10,17 @@ set -ex
|
||||
|
||||
VERSION=$1
|
||||
|
||||
rm -rf protobuf-php
|
||||
git clone https://github.com/protocolbuffers/protobuf-php.git
|
||||
git clone https://github.com/protocolbuffers/protobuf.git
|
||||
|
||||
# Clean old files
|
||||
pushd protobuf-php
|
||||
rm -rf src
|
||||
popd
|
||||
|
||||
# Checkout the target version
|
||||
pushd protobuf/php
|
||||
git checkout -b $VERSION
|
||||
popd
|
||||
rm -rf protobuf-php/src
|
||||
|
||||
# Copy files
|
||||
pushd protobuf-php
|
||||
mv ../protobuf/php/src src
|
||||
mv ../protobuf/php/composer.json.dist composer.json
|
||||
sed -i 's|php/src|src|g' composer.json
|
||||
cp -r php/src protobuf-php
|
||||
cp php/composer.json.dist protobuf-php/composer.json
|
||||
|
||||
cd protobuf-php
|
||||
git add .
|
||||
git commit -m "$VERSION"
|
||||
if [ $(git tag -l "$VERSION") ]; then
|
||||
@ -35,7 +28,3 @@ if [ $(git tag -l "$VERSION") ]; then
|
||||
else
|
||||
git tag "$VERSION"
|
||||
fi
|
||||
popd
|
||||
|
||||
# Clean up
|
||||
rm -rf protobuf
|
||||
|
Loading…
Reference in New Issue
Block a user