Fix revision numbers

This commit is contained in:
Andrea Cavalli 2021-12-11 15:54:12 +01:00
parent c8eb632200
commit 97b28e5cc0
4 changed files with 15 additions and 9 deletions

View File

@ -12,6 +12,9 @@ fi
source ./setup-variables.sh
FALLBACK_API_TYPE="sealed"
SAFE_VERSION_NAME="v4_0_${REVISION}"
REVISION_SUFFIX=""
REVISION_MVN="4.0.${REVISION}${REVISION_SUFFIX}"
if [ -z "${API_TYPE}" ]; then
cd ../../generated
@ -19,7 +22,7 @@ else
cd "../../generated-${API_TYPE}"
fi
mvn -B -DrevisionNumber="${REVISION}" "-D${API_TYPE:-${FALLBACK_API_TYPE}}" -DrevisionSuffix="" clean deploy
mvn -B -Drevision="${REVISION_MVN}" -DsafeVersionName="${SAFE_VERSION_NAME}" "-D${API_TYPE:-${FALLBACK_API_TYPE}}" clean deploy
echo "Done."
exit 0

View File

@ -9,8 +9,11 @@ else
fi
FALLBACK_API_TYPE="sealed"
SAFE_VERSION_NAME="v4_0_0"
REVISION_SUFFIX="-SNAPSHOT"
REVISION_MVN="4.0.0${REVISION_SUFFIX}"
mvn -B "-D${API_TYPE:-${FALLBACK_API_TYPE}}" deploy
mvn -B -Drevision="${REVISION_MVN}" -DsafeVersionName="${SAFE_VERSION_NAME}" "-D${API_TYPE:-${FALLBACK_API_TYPE}}" deploy
echo "Done."
exit 0

View File

@ -3,13 +3,13 @@
<groupId>it.tdlight</groupId>
<artifactId>${IMPLEMENTATION_NAME}-natives-${OPERATING_SYSTEM_NAME}-${CPU_ARCHITECTURE_NAME}</artifactId>
<!-- Don't change the version! (or change it also in <shadedPattern>) -->
<version>4.0.${revisionNumber}${revisionSuffix}</version>
<version>${revision}</version>
<name>${IMPLEMENTATION_NAME} natives for ${OPERATING_SYSTEM_NAME} (${CPU_ARCHITECTURE_NAME})</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revisionNumber>0</revisionNumber>
<revisionSuffix>-SNAPSHOT</revisionSuffix>
<revision>4.0.0-SNAPSHOT</revision>
<safeVersionName>v4_0_0</safeVersionName>
</properties>
<distributionManagement>
<repository>
@ -87,7 +87,7 @@
<relocations>
<relocation>
<pattern>it.tdlight.jni.implementation_name.operating_system_name.cpu_architecture_name.version</pattern>
<shadedPattern>it.tdlight.jni.${IMPLEMENTATION_NAME}.${OPERATING_SYSTEM_NAME_SHORT}.${CPU_ARCHITECTURE_NAME}.v4_0_${revisionNumber}</shadedPattern>
<shadedPattern>it.tdlight.jni.${IMPLEMENTATION_NAME}.${OPERATING_SYSTEM_NAME_SHORT}.${CPU_ARCHITECTURE_NAME}.${safeVersionName}</shadedPattern>
</relocation>
</relocations>
</configuration>

View File

@ -2,13 +2,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.tdlight</groupId>
<artifactId>${IMPLEMENTATION_NAME}-api-${API_TYPE}</artifactId>
<version>4.0.${revisionNumber}${revisionSuffix}</version>
<version>${revision}</version>
<name>${IMPLEMENTATION_NAME} API</name>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<revisionNumber>0</revisionNumber>
<revisionSuffix>-SNAPSHOT</revisionSuffix>
<revision>4.0.0-SNAPSHOT</revision>
<safeVersionName>v4_0_0</safeVersionName>
</properties>
<profiles>
<profile>