Add bazel php:release target for PECL tgz using generated package.xml (#10845)
* Add bazel php:release target for PECL tgz using generated package.xml * move targets from php/ext/google/protobuf to php packages since this breaks dist_files and add utf8 license file * Remove package.xml form Makefile.am * add files to Makefile.ampull/10960/head
parent
ba01779860
commit
accd49b95a
8 changed files with 190 additions and 1478 deletions
@ -0,0 +1,39 @@ |
||||
#!/bin/bash |
||||
|
||||
template_package_xml=$1 |
||||
release_version=$2 |
||||
release_files=$3 |
||||
out=$4 |
||||
|
||||
date=$(date +%Y-%m-%d) |
||||
time=$(date +%H:%M:%S) |
||||
|
||||
php_version_array=(${release_version//RC/ }) |
||||
api_version=${php_version_array[0]} |
||||
if [ ${#php_version_array[@]} -eq 2 ]; then |
||||
rc=${php_version_array[1]} |
||||
stability='beta' |
||||
else |
||||
stability='stable' |
||||
fi |
||||
|
||||
files="\\n" |
||||
for file in ${release_files//,/ }; do |
||||
name=$(echo $file | grep .*[^/]\$ | sed -e "s;protobuf-${release_version}/;;") |
||||
if [ ! -z $name ]; then |
||||
if [[ $name =~ LICENSE$ ]]; then |
||||
role='doc' |
||||
else |
||||
role='src' |
||||
fi |
||||
files+=" <file baseinstalldir=\"/\" name=\"${name}\" role=\"${role}\"/>\\n" |
||||
fi |
||||
done |
||||
|
||||
cat $template_package_xml | |
||||
sed -e "s;TEMPLATE_DATE;${date};" | |
||||
sed -e "s;TEMPLATE_TIME;${time};" | |
||||
sed -e "s;TEMPLATE_PHP_RELEASE;${release_version};" | |
||||
sed -e "s;TEMPLATE_PHP_API;${api_version};" | |
||||
sed -e "s;TEMPLATE_PHP_STABILITY;${stability};g" | |
||||
sed -e "s;TEMPLATE_FILES;${files};" > $out |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,42 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.5" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> |
||||
<name>protobuf</name> |
||||
<channel>pecl.php.net</channel> |
||||
<summary>Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.</summary> |
||||
<description>https://developers.google.com/protocol-buffers/</description> |
||||
<lead> |
||||
<name>Protobuf Team</name> |
||||
<user>protobufpackages</user> |
||||
<email>protobuf-packages@google.com</email> |
||||
<active>yes</active> |
||||
</lead> |
||||
<date>TEMPLATE_DATE</date> |
||||
<time>TEMPLATE_TIME</time> |
||||
<version> |
||||
<release>TEMPLATE_PHP_RELEASE</release> |
||||
<api>TEMPLATE_PHP_API</api> |
||||
</version> |
||||
<stability> |
||||
<release>TEMPLATE_PHP_STABILITY</release> |
||||
<api>TEMPLATE_PHP_STABILITY</api> |
||||
</stability> |
||||
<license uri="https://opensource.org/licenses/BSD-3-Clause">BSD-3-Clause</license> |
||||
<notes> |
||||
* See github.com/protocolbuffers/protobuf/releases for release notes. |
||||
</notes> |
||||
<contents> |
||||
<dir baseinstalldir="/" name="/">TEMPLATE_FILES</dir> |
||||
</contents> |
||||
<dependencies> |
||||
<required> |
||||
<php> |
||||
<min>7.0.0</min> |
||||
</php> |
||||
<pearinstaller> |
||||
<min>1.4.0</min> |
||||
</pearinstaller> |
||||
</required> |
||||
</dependencies> |
||||
<providesextension>protobuf</providesextension> |
||||
<extsrcrelease/> |
||||
</package> |
@ -1,3 +1,4 @@ |
||||
PROTOC_VERSION = "21.9" |
||||
PROTOBUF_JAVA_VERSION = "3.21.9" |
||||
PROTOBUF_PYTHON_VERSION = "4.21.9" |
||||
PROTOBUF_PHP_VERSION = "3.21.9" |
||||
|
Loading…
Reference in new issue