forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 5.0.x
This commit is contained in:
@@ -41,6 +41,7 @@ declare -a samples=(
|
||||
"${root}/bin/python-petstore-all.sh"
|
||||
"${root}/bin/python-server-all.sh"
|
||||
"${root}/bin/openapi3/python-petstore.sh"
|
||||
"${root}/bin/openapi3/python-experimental-petstore.sh"
|
||||
"${root}/bin/php-petstore.sh"
|
||||
"${root}/bin/php-silex-petstore-server.sh"
|
||||
"${root}/bin/php-symfony-petstore.sh"
|
||||
@@ -65,6 +66,7 @@ declare -a samples=(
|
||||
"${root}/bin/csharp-netcore-petstore-all.sh"
|
||||
"${root}/bin/elixir-petstore.sh"
|
||||
"${root}/bin/openapi3/go-petstore.sh"
|
||||
"${root}/bin/openapi3/go-experimental-petstore.sh"
|
||||
"${root}/bin/go-experimental-petstore.sh"
|
||||
"${root}/bin/go-petstore.sh"
|
||||
"${root}/bin/go-petstore-withxml.sh"
|
||||
@@ -91,8 +93,7 @@ declare -a always_iterate=(
|
||||
"${root}/bin/utils/export_generators_readme.sh"
|
||||
)
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true"
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
|
||||
if [ "true" = "$batch_mode" ]; then
|
||||
if [ ! -f "$executable" ]; then
|
||||
(cd "${root}" && mvn -B clean package -DskipTests=true -Dmaven.javadoc.skip=true)
|
||||
|
||||
@@ -78,6 +78,7 @@ declare -a xml_files=(
|
||||
"${root}/modules/openapi-generator-maven-plugin/pom.xml"
|
||||
"${root}/modules/openapi-generator-online/pom.xml"
|
||||
"${root}/modules/openapi-generator/pom.xml"
|
||||
"${root}/modules/openapi-generator-gradle-plugin/gradle.properties"
|
||||
"${root}/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml"
|
||||
"${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml"
|
||||
"${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
|
||||
|
||||
@@ -103,6 +103,7 @@ fi
|
||||
|
||||
declare -a xml_files=(
|
||||
"${root}/modules/openapi-generator-maven-plugin/README.md"
|
||||
"${root}/modules/openapi-generator-gradle-plugin/README.adoc"
|
||||
"${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
|
||||
"${root}/README.md"
|
||||
"${root}/docs/installation.md"
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# usage: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1
|
||||
#
|
||||
# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if [[ "$1" != "" ]]; then
|
||||
FROM="$1"
|
||||
else
|
||||
echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [[ "$2" != "" ]]; then
|
||||
TO="$2"
|
||||
else
|
||||
echo "Missing argument. Usage e.g.: ./bin/utils/release_version_update.sh 3.0.1-SNAPSHOT 3.0.1"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo "Release preparation: replacing $FROM with $TO in different files"
|
||||
|
||||
declare -a files=("modules/openapi-generator-maven-plugin/README.md"
|
||||
"modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml"
|
||||
"modules/openapi-generator-maven-plugin/examples/java-client.xml"
|
||||
"modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
|
||||
"modules/openapi-generator-maven-plugin/examples/non-java.xml"
|
||||
"modules/openapi-generator-gradle-plugin/README.adoc"
|
||||
"modules/openapi-generator-gradle-plugin/gradle.properties"
|
||||
"modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
|
||||
"modules/openapi-generator-gradle-plugin/samples/local-spec/README.md"
|
||||
"README.md")
|
||||
|
||||
sedi () {
|
||||
# Cross-platform version of sed -i that works both on Mac and Linux
|
||||
sed --version >/dev/null 2>&1 && sed -i -e "$@" || sed -i "" "$@"
|
||||
}
|
||||
|
||||
for filename in "${files[@]}"; do
|
||||
# e.g. sed -i '' "s/3.0.1-SNAPSHOT/3.0.1/g" CI/pom.xml.bash
|
||||
#echo "Running command: sed -i '' "s/$FROM/$TO/g" $filename"
|
||||
if sedi "s/$FROM/$TO/g" $filename; then
|
||||
echo "Updated $filename successfully!"
|
||||
else
|
||||
echo "ERROR: Failed to update $filename with the following command"
|
||||
echo "sed -i '' \"s/$FROM/$TO/g\" $filename"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user