Skip to content

Commit

Permalink
CI - fix gnext snapshot version
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Mar 8, 2024
1 parent c861bf9 commit 7767363
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions CI/post-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ SC_RELEASE_TAG="swagger-petstore-v3-$SC_VERSION"
#####################
python $CUR/CI/publishRelease.py "$SC_RELEASE_TAG"

#####################
### update the version to next snapshot in maven project with set version
#####################
mvn versions:set -DnewVersion="${SC_NEXT_VERSION}-SNAPSHOT"
mvn versions:commit

#####################
### update all other versions in files around to the next snapshot or new release, including readme and gradle ###
#####################

sc_find="version\: $SC_VERSION"
sc_replace="version: $SC_NEXT_VERSION-SNAPSHOT"
sed -i -e "s/$sc_find/$sc_replace/g" $CUR/src/main/resources/openapi.yaml
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>swagger-petstore</artifactId>
<packaging>war</packaging>
<name>swagger-petstore</name>
<version>1.0.18</version>
<version>1.0.19-SNAPSHOT</version>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ info:
Some useful links:
- [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
- [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
version: 1.0.18
version: 1.0.19-SNAPSHOT
title: Swagger Petstore - OpenAPI 3.0
termsOfService: 'http://swagger.io/terms/'
contact:
Expand Down

0 comments on commit 7767363

Please sign in to comment.