File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ RELEASED_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
1010if [ " ${RELEASED_VERSION##* -} " != " SNAPSHOT" ]; then
1111 echo " Changing version to $RELEASED_VERSION in README files"
1212 # Get list of directories for which README.md must be updated
13- module_folders=($( find . -maxdepth 2 \( -regex " ./gcloud-java[-[a-z]+]+* " -o -regex " . /gcloud-java-contrib/gcloud-java[ -[a-z]+]+* " \) -type d ) . ./gcloud-java)
13+ module_folders=($( find . -maxdepth 2 -type d | sed -E -n " /^(\.|\.\ /gcloud-java-contrib)\ /gcloud-java( -[a-z]+)+$/p " ) . ./gcloud-java)
1414 for item in ${module_folders[*]}
1515 do
1616 sed -ri " s/<version>[0-9]+\.[0-9]+\.[0-9]+<\/version>/<version>${RELEASED_VERSION} <\/version>/g" ${item} /README.md
Original file line number Diff line number Diff line change 1111# Get the previous maven project version.
1212CURRENT_VERSION=$( mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev ' (^\[|\w+:)' )
1313# Get list of directories for which pom.xml must be updated
14- module_folders=($( find . -maxdepth 2 \( -regex " ./gcloud-java[-[a-z]+]+* " -o -regex " . /gcloud-java-contrib/gcloud-java[ -[a-z]+]+* " \) -type d ) . ./gcloud-java)
14+ module_folders=($( find . -maxdepth 2 -type d | sed -E -n " /^(\.|\.\ /gcloud-java-contrib)\ /gcloud-java( -[a-z]+)+$/p " ) . ./gcloud-java)
1515if [ $# -eq 1 ]; then
1616 NEW_VERSION=$1
1717elif [ " ${CURRENT_VERSION##* -} " != " SNAPSHOT" ]; then
You can’t perform that action at this time.
0 commit comments