Prepare 3.0.1 release (#280)

* add new bash script for release version update

* update version using the bash script

* Fix shippable build

Modify `artifactId` of `CI/pom.xml.shippable` to be `openapi-generator-shippable-pom`

* Comment ensure-up-to-date

* add shippable to the release script

* Updates README based on new release changes (#271)

The release management changes moved from maven-publish (newer plugin)
to maven (older plugin, only one that works currently with signing).
This updates docs in the samples/local-spec project with current
directions.

Also:

* Includes sonatype releases/snapshots on repo lookup
* Adds openApiGeneratorVersion property
This commit is contained in:
William Cheng 2018-06-11 22:32:15 +08:00 committed by Jim Schubert
parent 0a479f77f6
commit 0453e64fa6
21 changed files with 105 additions and 24 deletions

View File

@ -9,7 +9,7 @@
<artifactId>openapi-generator-project</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<url>https://github.com/openapi-tools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapi-tools/openapi-generator.git</connection>

View File

@ -10,7 +10,7 @@
<artifactId>openapi-generator-project</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<url>https://github.com/openapitools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>

View File

@ -10,7 +10,7 @@
<artifactId>openapi-generator-project</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<url>https://github.com/openapitools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>

View File

@ -9,7 +9,7 @@
<artifactId>openapi-generator-project</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<url>https://github.com/openapitools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>

View File

@ -6,10 +6,10 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<artifactId>openapi-generator-shippable-pom</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>3.0.1-SNAPSHOT</version>
<name>openapi-generator-shippable-pom</name>
<version>3.0.1</version>
<url>https://github.com/openapitools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
@ -858,10 +858,7 @@
</profile>
</profiles>
<modules>
<module>../modules/openapi-generator</module>
<module>../modules/openapi-generator-cli</module>
<module>../modules/openapi-generator-maven-plugin</module>
<module>../modules/openapi-generator-online</module>
<module>../</module>
</modules>
<reporting>
<outputDirectory>target/site</outputDirectory>

View File

@ -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)

View File

@ -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

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -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"
}
}

View File

@ -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 {

View File

@ -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

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -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
```

View File

@ -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"
}
}

View File

@ -0,0 +1 @@
openApiGeneratorVersion=3.0.1-SNAPSHOT

View File

@ -4,7 +4,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>openapi-generator-maven-plugin</artifactId>

View File

@ -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

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>openapi-generator-online</artifactId>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<relativePath>../..</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -9,7 +9,7 @@
<artifactId>openapi-generator-project</artifactId>
<packaging>pom</packaging>
<name>openapi-generator-project</name>
<version>3.0.1-SNAPSHOT</version>
<version>3.0.1</version>
<url>https://github.com/openapitools/openapi-generator</url>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>

View File

@ -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