Skip to content

Commit

Permalink
Update post/prepare release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
micryc committed Mar 21, 2024
1 parent 60af703 commit 08c63ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions CI/post-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ 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 ###
### update all other versions in files around to the next snapshot or new release ###
#####################

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
sc_find="<param-value>$SC_VERSION"
sc_replace="<param-value>$SC_SC_NEXT_VERSION\-SNAPSHOT"
sed -i -e "s/$sc_find/$sc_replace/g" $CUR/src/main/webapp/WEB-INF/web.xml


sc_find="$SC_VERSION"
sc_replace="$SC_NEXT_VERSION\-SNAPSHOT"
sed -i -e "s/$sc_find/$sc_replace/g" Dockerfile
6 changes: 3 additions & 3 deletions CI/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ mvn versions:set -DnewVersion=$SC_VERSION
mvn versions:commit

#####################
### update version in openapi.yaml file ###
### update version in files ###
#####################
sc_find="<param-value>$SC_VERSION\-SNAPSHOT"
sc_replace="<param-value>$SC_VERSION"
sed -i -e "s/$sc_find/$sc_replace/g" $CUR/src/main/webapp/WEB-INF/web.xml


sc_find="target/swagger-petstore-v2-$SC_VERSION\-SNAPSHOT"
sc_replace="target/swagger-petstore-v2-$SC_VERSION"
sc_find="$SC_VERSION\-SNAPSHOT"
sc_replace="$SC_VERSION"
sed -i -e "s/$sc_find/$sc_replace/g" Dockerfile

#####################
Expand Down

0 comments on commit 08c63ba

Please sign in to comment.