aboutsummaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2019-02-26 09:25:37 -0800
committerGitHub <noreply@github.com>2019-02-26 09:25:37 -0800
commit0aad5339cac24ca8580ba31fb4fbf1bb90ff318a (patch)
tree70c57595fa55d8a87c5d206eb521a2cf199ffa3a /php
parent5d8cd3b89577eef7b229157d4330b66fbb2f3f46 (diff)
downloadplatform_external_protobuf-0aad5339cac24ca8580ba31fb4fbf1bb90ff318a.tar.gz
platform_external_protobuf-0aad5339cac24ca8580ba31fb4fbf1bb90ff318a.tar.bz2
platform_external_protobuf-0aad5339cac24ca8580ba31fb4fbf1bb90ff318a.zip
Add a script to mirror php changes to protobuf-php (#5778)
* Add a script to mirror php changes to protobuf-php * Create tag
Diffstat (limited to 'php')
-rw-r--r--php/release.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/php/release.sh b/php/release.sh
new file mode 100644
index 000000000..220ca2aa4
--- /dev/null
+++ b/php/release.sh
@@ -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