100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
fix: Update Gradle release version in Extensions (#3079)
Dennis Kuijs9796de044e3b
diff --git a/.ci_cd/check_artifacts.sh b/.ci_cd/check_artifacts.shindex 24c41ff5d..634698ea9 100755--- a/.ci_cd/check_artifacts.sh+++ b/.ci_cd/check_artifacts.sh@@ -3,13 +3,14 @@ set -eo pipefailRELEASED_VERSION="${1:?Usage: $0 <released_version> <true or false>}"IS_RELEASE="${2:?Usage: $0 <released_version> <true or false>}"+MAX_RETRIES=40if [ "$IS_RELEASE" == true ]; thenecho "Check if OpenRemote artifacts '$RELEASED_VERSION' are available."STATUS=$(curl --head --silent https://repo1.maven.org/maven2/io/openremote/openremote-manager/$RELEASED_VERSION/openremote-manager-$RELEASED_VERSION.jar --output /dev/null --write-out "%{http_code}")COUNT=0- while [ "$STATUS" != 200 ] && [ "$COUNT" -lt 30 ]; do+ while [ "$STATUS" != 200 ] && [ "$COUNT" -lt "$MAX_RETRIES" ]; doecho "Artifacts not yet available ... Sleeping 60 seconds"sleep 60STATUS=$(curl --head --silent https://repo1.maven.org/maven2/io/openremote/openremote-manager/$RELEASED_VERSION/openremote-manager-$RELEASED_VERSION.jar --output /dev/null --write-out "%{http_code}")@@ -29,7 +30,7 @@ if [ "$IS_RELEASE" == false ]; thenVERSION=$(curl -s "https://central.sonatype.com/repository/maven-snapshots/io/openremote/openremote-manager/maven-metadata.xml" | sed -n 's:.*<latest>\(.*\)</latest>.*:\1:p')COUNT=0- while [ "$VERSION" != "$RELEASED_VERSION" ] && [ "$COUNT" -lt 30 ]; do+ while [ "$VERSION" != "$RELEASED_VERSION" ] && [ "$COUNT" -lt "$MAX_RETRIES" ]; doecho "SNAPSHOT artifacts not yet available ... Sleeping 60 seconds"sleep 60VERSION=$(curl -s "https://central.sonatype.com/repository/maven-snapshots/io/openremote/openremote-manager/maven-metadata.xml" | sed -n 's:.*<latest>\(.*\)</latest>.*:\1:p')diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.ymlindex b33654f49..5c5b2da5e 100644--- a/.github/workflows/extensions.yml+++ b/.github/workflows/extensions.yml@@ -25,6 +25,31 @@ jobs:chmod +x .ci_cd/check_artifacts.sh.ci_cd/check_artifacts.sh "${{ inputs.version }}" "${{ inputs.is_release }}"+ update-openremote-version:+ name: Update OpenRemote version in gradle/libs.versions.toml+ runs-on: ubuntu-latest+ needs: check-artifacts+ if: ${{ inputs.is_release == 'true' }}+ steps:+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0+ with:+ repository: openremote/extensions+ path: extensions+ ref: main+ sparse-checkout: gradle/libs.versions.toml+ - run: |+ CURRENT=$(grep '^openremote = ' extensions/gradle/libs.versions.toml | sed -E 's/^openremote = "([^\"]+)".*/\1/' | head -n 1)+ if [ "$CURRENT" != "$VERSION" ]; then+ sed -i "s/^openremote = .*/openremote = \"$VERSION\"/" extensions/gradle/libs.versions.toml+ git -C extensions add gradle/libs.versions.toml+ git -C extensions -c user.name="github-actions[bot]" -c user.email="github-actions[bot]@users.noreply.github.com" commit -m "Update OpenRemote version to $VERSION [skip ci]"+ git -C extensions push+ else+ echo "Version unchanged, skipping commit."+ fi+ env:+ VERSION: ${{ inputs.version }}+create-extensions-release:name: Create releaseruns-on: ubuntu-latest