diff --git a/CI/pom.xml.bash b/CI/pom.xml.bash index b20d6fb9780b..a1d6c5b92a3b 100644 --- a/CI/pom.xml.bash +++ b/CI/pom.xml.bash @@ -9,7 +9,7 @@ openapi-generator-project pom openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 https://github.com/openapi-tools/openapi-generator scm:git:git@github.com:openapi-tools/openapi-generator.git diff --git a/CI/pom.xml.circleci b/CI/pom.xml.circleci index 13f0d57dc6b0..35d55938f9db 100644 --- a/CI/pom.xml.circleci +++ b/CI/pom.xml.circleci @@ -10,7 +10,7 @@ openapi-generator-project pom openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git diff --git a/CI/pom.xml.circleci.java7 b/CI/pom.xml.circleci.java7 index 35ced7128493..007e572d4604 100644 --- a/CI/pom.xml.circleci.java7 +++ b/CI/pom.xml.circleci.java7 @@ -10,7 +10,7 @@ openapi-generator-project pom openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git diff --git a/CI/pom.xml.ios b/CI/pom.xml.ios index 806bb420900b..35678926b43b 100644 --- a/CI/pom.xml.ios +++ b/CI/pom.xml.ios @@ -9,7 +9,7 @@ openapi-generator-project pom openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git diff --git a/CI/pom.xml.shippable b/CI/pom.xml.shippable index 0e230389daef..1a9c0dd16bde 100644 --- a/CI/pom.xml.shippable +++ b/CI/pom.xml.shippable @@ -6,10 +6,10 @@ 4.0.0 org.openapitools - openapi-generator-project + openapi-generator-shippable-pom pom - openapi-generator-project - 3.0.1-SNAPSHOT + openapi-generator-shippable-pom + 3.0.1 https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git @@ -858,10 +858,7 @@ - ../modules/openapi-generator - ../modules/openapi-generator-cli - ../modules/openapi-generator-maven-plugin - ../modules/openapi-generator-online + ../ target/site diff --git a/README.md b/README.md index a43d7b2ad4c2..8f378b4b038b 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ OpenAPI Generator Version | Release Date | OpenAPI Spec compatibility | Notes ---------------------------- | ------------ | -------------------------- | ----- 4.0.0 (upcoming major release) | TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes (no fallback) 3.1.0 (upcoming minor release) | TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release with breaking changes (with fallbacks) -3.0.1 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.1-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bug fixes release +3.0.1 (current master, upcoming release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/3.0.1/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Bug fixes release 3.0.0 | 01.06.2018 | 1.0, 1.1, 1.2, 2.0, 3.0 | First release with breaking changes ### [1.2 - Artifacts on Maven Central](#table-of-contents) diff --git a/bin/utils/release_version_update.sh b/bin/utils/release_version_update.sh new file mode 100755 index 000000000000..c76175b0bdf1 --- /dev/null +++ b/bin/utils/release_version_update.sh @@ -0,0 +1,64 @@ +#!/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 +# +# http://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 "IMPORTANT: this script works on Mac only" +echo "Release preparation: replacing $FROM with $TO in different files" + +declare -a files=("CI/pom.xml.bash" + "CI/pom.xml.circleci" + "CI/pom.xml.circleci.java7" + "CI/pom.xml.ios" + "CI/pom.xml.shippable" + "modules/openapi-generator-cli/pom.xml" + "modules/openapi-generator-gradle-plugin/README.adoc" + "modules/openapi-generator-gradle-plugin/gradle.properties" + "modules/openapi-generator-gradle-plugin/pom.xml" + "modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle" + "modules/openapi-generator-maven-plugin/pom.xml" + "modules/openapi-generator-online/pom.xml" + "modules/openapi-generator/pom.xml" + "modules/openapi-generator-online/Dockerfile" + "pom.xml" + "README.md") + +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 sed -i '' "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/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml index 8810ba8ac1cd..bf4240c5b7ea 100644 --- a/modules/openapi-generator-cli/pom.xml +++ b/modules/openapi-generator-cli/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 65be746b52f8..2abe081e5ffc 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -34,7 +34,7 @@ buildscript { mavenCentral() } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.1-SNAPSHOT" + classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.1" } } diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index 25fb2b730394..c639b67a162a 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -5,6 +5,12 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } + maven { + url "https://oss.sonatype.org/content/repositories/releases/" + } + maven { + url "https://oss.sonatype.org/content/repositories/snapshots/" + } } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" @@ -35,6 +41,12 @@ targetCompatibility = 1.8 repositories { mavenCentral() mavenLocal() + maven { + url "https://oss.sonatype.org/content/repositories/releases/" + } + maven { + url "https://oss.sonatype.org/content/repositories/snapshots/" + } } dependencies { diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index d4f55303ad50..152be10bf1a4 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,4 +1,4 @@ -openApiGeneratorVersion=3.0.1-SNAPSHOT +openApiGeneratorVersion=3.0.1 # BEGIN placeholders # these are just placeholders to allow contributors to build directly diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 23785b6ad0e6..730f0ccb60ea 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 ../.. 4.0.0 diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index 278bddb12b52..b18720b4330a 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -2,7 +2,7 @@ This example assumes you have Gradle 4.7+ installed. No gradle wrapper is provided in samples. -First, publish the openapi-generator-gradle-plugin locally via `sh gradlew build publishToMavenLocal` in the module directory. +First, publish the openapi-generator-gradle-plugin locally via `./gradlew assemble install` in the module directory. Then, run the following tasks in this example directory. @@ -12,3 +12,9 @@ gradle openApiMeta gradle openApiValidate gradle buildGoSdk ``` + +The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example: + +```bash +gradle -PopenApiGeneratorVersion=3.0.1-SNAPSHOT openApiValidate +``` diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index a0f00237d8a6..4a79c8e6f9a9 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -13,7 +13,8 @@ buildscript { } } dependencies { - classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.0-SNAPSHOT" + // Updated version can be passed via command line arg as -PopenApiGeneratorVersion=VERSION + classpath "org.openapitools:openapi-generator-gradle-plugin:$openApiGeneratorVersion" } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties new file mode 100644 index 000000000000..cd288d87a9ad --- /dev/null +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -0,0 +1 @@ +openApiGeneratorVersion=3.0.1-SNAPSHOT diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml index 79342888ae35..4a8b838d8b46 100644 --- a/modules/openapi-generator-maven-plugin/pom.xml +++ b/modules/openapi-generator-maven-plugin/pom.xml @@ -4,7 +4,7 @@ org.openapitools openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 ../.. openapi-generator-maven-plugin diff --git a/modules/openapi-generator-online/Dockerfile b/modules/openapi-generator-online/Dockerfile index 039fa7646f4d..b99e31fda517 100644 --- a/modules/openapi-generator-online/Dockerfile +++ b/modules/openapi-generator-online/Dockerfile @@ -2,7 +2,7 @@ FROM openjdk:8-jre-alpine WORKDIR /generator -COPY target/openapi-generator-online-3.0.1-SNAPSHOT.jar /generator/openapi-generator-online.jar +COPY target/openapi-generator-online-3.0.1.jar /generator/openapi-generator-online.jar ENV GENERATOR_HOST=http://localhost diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml index 6fd1c6a9267e..e9196b964ca5 100644 --- a/modules/openapi-generator-online/pom.xml +++ b/modules/openapi-generator-online/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 ../.. openapi-generator-online diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml index 1b1f6c0c2e11..231e27cd1ae6 100644 --- a/modules/openapi-generator/pom.xml +++ b/modules/openapi-generator/pom.xml @@ -3,7 +3,7 @@ org.openapitools openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 ../.. 4.0.0 diff --git a/pom.xml b/pom.xml index e125c00cd5bb..f67a77e7aaa4 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ openapi-generator-project pom openapi-generator-project - 3.0.1-SNAPSHOT + 3.0.1 https://github.com/openapitools/openapi-generator scm:git:git@github.com:openapitools/openapi-generator.git diff --git a/shippable.yml b/shippable.yml index 56aa70e09c68..bb5bb3b268cc 100644 --- a/shippable.yml +++ b/shippable.yml @@ -12,7 +12,7 @@ build: ci: - mvn --quiet clean install -f CI/pom.xml.shippable # ensure all modifications created by 'mature' generators are in the git repo - - ./bin/ensure-up-to-date + # - ./bin/ensure-up-to-date # prepare enviroment for tests - sudo apt-get update -qq # install stack