Update pom.template.xml, deploy_release.sh, and setup_variables.sh

This commit is contained in:
Andrea Cavalli 2020-10-11 17:52:48 +02:00
parent e7be15ba01
commit c69def3fb8
3 changed files with 56 additions and 2 deletions

View File

@ -2,11 +2,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.tdlight</groupId>
<artifactId>${IMPLEMENTATION_NAME}-natives-${OPERATING_SYSTEM_NAME}-${CPU_ARCHITECTURE_NAME}</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0.${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>
<revision>0-SNAPSHOT</revision>
</properties>
<distributionManagement>
<repository>
@ -45,6 +46,48 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.11.2</version>
<configuration>
<tag>${project.artifactId}-${project.version}</tag>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<nexusUrl>https://mvn.mchv.eu/</nexusUrl>
<serverId>mchv</serverId>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>

View File

@ -1,7 +1,16 @@
#!/bin/bash -e
# REQUIRED PARAMETERS:
# REVISION = <revision>
# Check variables correctness
if [ -z "${REVISION}" ]; then
echo "Missing parameter: REVISION"
exit 1
fi
cd ../generated
mvn -DpushChanges=false -DlocalCheckout=true -DpreparationGoals=initialize release:prepare release:perform -B
mvn -B -Drevision=${REVISION} deploy
echo "Done."
exit 0

View File

@ -2,6 +2,7 @@
set -e
# ====== Variables
export REVISION=$TRAVIS_BUILD_NUMBER
export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/javax.crypto=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"
if [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then
export CPU_ARCHITECTURE_NAME="aarch64"
@ -52,6 +53,7 @@ elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
fi
# ====== Print variables
echo "REVISION=${REVISION}"
echo "TD_SRC_DIR=${TD_SRC_DIR}"
echo "TD_BIN_DIR=${TD_BIN_DIR}"
echo "TDNATIVES_BIN_DIR=${TDNATIVES_BIN_DIR}"