From 7cdbcec1a55d9d98e0a888e5d2bed99adaa7ad19 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Fri, 31 Jan 2020 22:40:33 -0500 Subject: [PATCH] [doc] Update versions missed during release (#5185) * [doc] Update versions missed during release Removed old script bin/utils/release_version_update_docs.sh to avoid confusion. New script solves issues of not "globally" replacing. New script is at: bin/utils/release/release_version_update_docs.sh * Update Gradle Plugin README with correct version * Update gradle.properties to correct version --- README.md | 4 +- bin/utils/release/release_version_update.sh | 1 + .../release/release_version_update_docs.sh | 1 + bin/utils/release_version_update_docs.sh | 61 ------------------- docs/installation.md | 8 +-- .../README.adoc | 4 +- .../samples/local-spec/gradle.properties | 2 +- website/pages/en/index.js | 2 +- 8 files changed, 12 insertions(+), 71 deletions(-) delete mode 100755 bin/utils/release_version_update_docs.sh diff --git a/README.md b/README.md index 25441aa85e..86b1546feb 100644 --- a/README.md +++ b/README.md @@ -393,10 +393,10 @@ openapi-generator version ``` -Or install a particular OpenAPI Generator version (e.g. v4.2.2): +Or install a particular OpenAPI Generator version (e.g. v4.2.3): ```sh -npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g ``` Or install it as dev-dependency: diff --git a/bin/utils/release/release_version_update.sh b/bin/utils/release/release_version_update.sh index 95d41712c5..c2be83681c 100755 --- a/bin/utils/release/release_version_update.sh +++ b/bin/utils/release/release_version_update.sh @@ -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" diff --git a/bin/utils/release/release_version_update_docs.sh b/bin/utils/release/release_version_update_docs.sh index cfd66070e9..160674acbd 100755 --- a/bin/utils/release/release_version_update_docs.sh +++ b/bin/utils/release/release_version_update_docs.sh @@ -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" diff --git a/bin/utils/release_version_update_docs.sh b/bin/utils/release_version_update_docs.sh deleted file mode 100755 index c6b8f12921..0000000000 --- a/bin/utils/release_version_update_docs.sh +++ /dev/null @@ -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 diff --git a/docs/installation.md b/docs/installation.md index 60105c9a9b..ff84a2de77 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g To install a specific version of the tool, pass the version during installation: ```bash -npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g +npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g ``` To install the tool as a dev dependency in your current project: @@ -80,18 +80,18 @@ docker run --rm \ If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum): -JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar` +JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar` For **Mac/Linux** users: ```bash -wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar -O openapi-generator-cli.jar +wget https//repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar -O openapi-generator-cli.jar ``` For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. ``` -Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.2/openapi-generator-cli-4.2.2.jar +Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.2.3/openapi-generator-cli-4.2.3.jar ``` diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index e107d0956f..f386781447 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -84,7 +84,7 @@ buildscript { // url "https://plugins.gradle.org/m2/" } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:4.2.0" + classpath "org.openapitools:openapi-generator-gradle-plugin:4.2.3" } } @@ -649,7 +649,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' - classpath('org.openapitools:openapi-generator-gradle-plugin:4.2.0') { + classpath('org.openapitools:openapi-generator-gradle-plugin:4.2.3') { exclude group: 'com.google.guava' } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties index 240b76bafa..14a68fc42a 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -1,3 +1,3 @@ # RELEASE_VERSION -openApiGeneratorVersion=4.2.0 +openApiGeneratorVersion=4.3.0-SNAPSHOT # /RELEASE_VERSION diff --git a/website/pages/en/index.js b/website/pages/en/index.js index 698cec5381..155ebb7b84 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -185,7 +185,7 @@ class Index extends React.Component { | npm install @openapitools/openapi-generator-cli -g | | # install a specific version of "openapi-generator-cli" - | npm install @openapitools/openapi-generator-cli@cli-4.2.2 -g + | npm install @openapitools/openapi-generator-cli@cli-4.2.3 -g | | # Or install it as dev-dependency in your node.js projects | npm install @openapitools/openapi-generator-cli -D