Skip to content

Commit

Permalink
Prepare 3.0.1 release (#280)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
wing328 authored and jimschubert committed Jun 11, 2018
1 parent 0a479f7 commit 0453e64
Show file tree
Hide file tree
Showing 21 changed files with 105 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CI/pom.xml.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:openapi-tools/openapi-generator.git</connection>
Expand Down
2 changes: 1 addition & 1 deletion CI/pom.xml.circleci
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:openapitools/openapi-generator.git</connection>
Expand Down
2 changes: 1 addition & 1 deletion CI/pom.xml.circleci.java7
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:openapitools/openapi-generator.git</connection>
Expand Down
2 changes: 1 addition & 1 deletion CI/pom.xml.ios
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:openapitools/openapi-generator.git</connection>
Expand Down
11 changes: 4 additions & 7 deletions CI/pom.xml.shippable
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:openapitools/openapi-generator.git</connection>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
64 changes: 64 additions & 0 deletions bin/utils/release_version_update.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion modules/openapi-generator-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator-gradle-plugin/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down
12 changes: 12 additions & 0 deletions modules/openapi-generator-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator-gradle-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator-gradle-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
```
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openApiGeneratorVersion=3.0.1-SNAPSHOT
2 changes: 1 addition & 1 deletion modules/openapi-generator-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator-online/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator-online/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion modules/openapi-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]:openapitools/openapi-generator.git</connection>
Expand Down
2 changes: 1 addition & 1 deletion shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0453e64

Please sign in to comment.