From 8408f8fb64f167864d3922f1775c92cfd7dc2c1f Mon Sep 17 00:00:00 2001 From: Marco Collovati Date: Thu, 28 Dec 2023 19:17:58 +0100 Subject: [PATCH] chore: improve classifiers deployment --- tools/build_flow_widgetsets.sh | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/tools/build_flow_widgetsets.sh b/tools/build_flow_widgetsets.sh index 4074457c..39d78ed5 100755 --- a/tools/build_flow_widgetsets.sh +++ b/tools/build_flow_widgetsets.sh @@ -7,8 +7,6 @@ # action : maven goal to execute, defaults to 'package' # kind : artifact type (snapshot, release), defaults to 'release' # -# cat maven-metadata.xml | grep "" | sed 's/^.*\([^<]*\)<.*/\1/g' | sort -r -# curl -s https://repo1.maven.org/maven2/com/vaadin/vaadin-core/maven-metadata.xml | grep "23\..*" | sed -E 's/^.*(.*)<\/version>.*/\1/g' | sort -r -t '.' ####### _base_dir="$(dirname $(realpath $0))/.." @@ -48,26 +46,17 @@ function get_vaadin_versions() { } get_vaadin_versions #"versions" -###versions=("${versions[@]:9:3}") echo "Search for existing classifiers..." -declare -A _existing_versions -for version in "${versions[@]}"; do +__existing_classifiers=$(curl -s https://repo.repsy.io/mvn/mcollovati/vertx-vaadin-snapshots/com/github/mcollovati/vertx/vaadin-flow-sockjs/${_current_version}/maven-metadata.xml \ + | grep "vaadin-" | sed -E 's/^.*vaadin-(.*)<\/classifier>.*/\1/g' | sort -r -t '.' || echo '') +echo "Existing classifiers for version ${_current_version} ===> ${__existing_classifiers}" +echo - flag=$( - mvn -N -q dependency:get -Dartifact=com.github.mcollovati.vertx:vaadin-flow-sockjs:${_current_version}:jar:vaadin-${version} \ - -DremoteRepositories=repsy-vertx-vaadin::::https://repo.repsy.io/mvn/mcollovati/vertx-vaadin/ -Dtransitive=false 2>&1 >/dev/null && \ - echo 1 || echo 0 - ) - echo " --> Searching classifier vaadin-${version} for version ${_current_version} ===> ${flag}" - if [[ "${flag}" = "1" ]]; then - _existing_versions[$version]=$version - fi +declare -A _existing_versions +for v in ${__existing_classifiers}; do + _existing_versions[$v]=$v done -echo "Existing classifiers for ${_current_version}:" -echo "${_existing_versions[@]}" -echo - _last_built="" for version in "${versions[@]}"; do