forked from protocolbuffers/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request protocolbuffers#10830 from zhangskz:release-php
PiperOrigin-RevId: 485357156
- Loading branch information
Showing
6 changed files
with
172 additions
and
1,484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.