Skip to content

Commit 21027a2

Browse files
authored
Merge pull request #9832 from haberman/php-dist
Fixed PHP release script.
2 parents 616a7ef + 634a568 commit 21027a2

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

php/composer.json.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
},
1717
"autoload": {
1818
"psr-4": {
19-
"Google\\Protobuf\\": "php/src/Google/Protobuf",
20-
"GPBMetadata\\Google\\Protobuf\\": "php/src/GPBMetadata/Google/Protobuf"
19+
"Google\\Protobuf\\": "src/Google/Protobuf",
20+
"GPBMetadata\\Google\\Protobuf\\": "src/GPBMetadata/Google/Protobuf"
2121
}
2222
}
2323
}

php/release.sh

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,21 @@ set -ex
1010

1111
VERSION=$1
1212

13+
rm -rf protobuf-php
1314
git clone https://github.com/protocolbuffers/protobuf-php.git
14-
git clone https://github.com/protocolbuffers/protobuf.git
1515

1616
# Clean old files
17-
pushd protobuf-php
18-
rm -rf src
19-
popd
20-
21-
# Checkout the target version
22-
pushd protobuf/php
23-
git checkout -b $VERSION
24-
popd
17+
rm -rf protobuf-php/src
2518

2619
# Copy files
27-
pushd protobuf-php
28-
mv ../protobuf/php/src src
29-
mv ../protobuf/php/composer.json.dist composer.json
30-
sed -i 's|php/src|src|g' composer.json
20+
cp -r php/src protobuf-php
21+
cp php/composer.json.dist protobuf-php/composer.json
22+
23+
cd protobuf-php
3124
git add .
3225
git commit -m "$VERSION"
3326
if [ $(git tag -l "$VERSION") ]; then
3427
echo "tag $VERSION already exists"
3528
else
3629
git tag "$VERSION"
3730
fi
38-
popd
39-
40-
# Clean up
41-
rm -rf protobuf

0 commit comments

Comments
 (0)