Add a script to mirror php changes to protobuf-php (#5778)
* Add a script to mirror php changes to protobuf-php * Create tag
This commit is contained in:
parent
5d8cd3b895
commit
0aad5339ca
37
php/release.sh
Normal file
37
php/release.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Make sure we are in a protobuf source tree.
|
||||
[ -f "php/release.sh" ] || {
|
||||
echo "This script must be ran under root of protobuf source tree."
|
||||
exit 1
|
||||
}
|
||||
|
||||
VERSION=$1
|
||||
|
||||
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 $VERSION
|
||||
popd
|
||||
|
||||
# Copy files
|
||||
pushd protobuf-php
|
||||
mv ../protobuf/php/src src
|
||||
mv ../protobuf/composer.json composer.json
|
||||
sed -i 's|php/src|src|g' composer.json
|
||||
git add .
|
||||
git commit -m "$VERSION"
|
||||
git tag "$VERSION"
|
||||
popd
|
||||
|
||||
# Clean up
|
||||
rm -rf protobuf
|
Loading…
Reference in New Issue
Block a user