@@ -52,11 +52,12 @@ jobs:
52
52
}]
53
53
- name : Build with Maven
54
54
run : |
55
- export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
55
+ export MY_POM_VERSION=`mvn -Dswagger-codegen-version=3.0.38 - q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
56
56
echo "POM VERSION" ${MY_POM_VERSION}
57
- export CODEGEN_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${swagger-codegen-version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
57
+ export CODEGEN_VERSION=`sed -n 's/<swagger\-codegen\-version>\([^\s]*\)<\/swagger\-codegen\-version>/\1/p' pom.xml`
58
+ export CODEGEN_VERSION=`echo ${CODEGEN_VERSION} | tr -d '[:space:]'`
58
59
echo "CODEGEN_VERSION" ${CODEGEN_VERSION}
59
- export CODEGEN_VERSION =""
60
+ export CODEGEN_VERSION_PROPERTY =""
60
61
if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
61
62
then
62
63
if [[ ! $CODEGEN_VERSION =~ ^.*SNAPSHOT$ ]];
73
74
LAST_SNAP=`jq '.data | sort_by(.lastModified) | reverse | .[0].text' maven-metadata.json`
74
75
export LAST_SNAP=${LAST_SNAP:1:${#LAST_SNAP}-2}
75
76
echo "LAST_SNAP $LAST_SNAP"
76
- export CODEGEN_VERSION_PROPERTY=-Dswagger-codgen -version=$LAST_SNAP
77
+ export CODEGEN_VERSION_PROPERTY=-Dswagger-codegen -version=$LAST_SNAP
77
78
fi
78
79
fi
79
80
fi
83
84
- name : Deploy Maven Snapshot
84
85
if : ${{ matrix.java == 17 }}
85
86
run : |
86
- export MY_POM_VERSION=`mvn -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
87
+ export MY_POM_VERSION=`mvn -Dswagger-codegen-version=3.0.38 - q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec`
87
88
echo "POM VERSION" ${MY_POM_VERSION}
88
89
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]];
89
90
then
0 commit comments