Skip to content

Commit

Permalink
Merge pull request protocolbuffers#10558 from deannagarcia/3.18.x
Browse files Browse the repository at this point in the history
Fix php release script
  • Loading branch information
shaod2 authored Sep 14, 2022
2 parents 023bbea + 7a83efd commit 8f67853
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
8 changes: 4 additions & 4 deletions php/ext/google/protobuf/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<summary>Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.</summary>
<description>https://developers.google.com/protocol-buffers/</description>
<lead>
<name>Bo Yang</name>
<user>stanleycheung</user>
<email>protobuf-opensource@google.com</email>
<name>Protobuf Team</name>
<user>protobufpackages</user>
<email>protobuf-packages@google.com</email>
<active>yes</active>
</lead>
<date>2022-09-13</date>
Expand Down Expand Up @@ -1122,7 +1122,7 @@ G A release.
<release>stable</release>
<api>stable</api>
</stability>
<date>2022-09-13</date>
<date>2022-09-14</date>
<time>10:41:45</time>
<license uri="https://opensource.org/licenses/BSD-3-Clause">3-Clause BSD License</license>
<notes>
Expand Down
31 changes: 11 additions & 20 deletions php/release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/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."
Expand All @@ -10,28 +8,21 @@ 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/composer.json composer.json
sed -i 's|php/src|src|g' composer.json
cp -r php/src protobuf-php
cp composer.json protobuf-php/composer.json

cd protobuf-php
git add .
git commit -m "$VERSION"
git tag "$VERSION"
popd

# Clean up
rm -rf protobuf
if [ $(git tag -l "$VERSION") ]; then
echo "tag $VERSION already exists"
else
git tag "$VERSION"
fi

0 comments on commit 8f67853

Please sign in to comment.