Files
hawkbit/check-dependencies.sh
Avgustin Marinov 9c86729a68 [#1393,#1008] Switch to Eclipse v2.0 license (#1427)
Switching license from EPL v1 to v2. Following
https://www.eclipse.org/legal/epl-2.0/faq.php#h.tci84nlsqpgw

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
2023-09-14 11:03:20 +03:00

36 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# Copyright (c) 2023 Bosch.IO GmbH and others
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
DASH_LICENSE_JAR=$1
shift
if [ ! -f "$DASH_LICENSE_JAR" ]; then
echo "This script can be used to update the DEPENDENCIES"
echo "file with the result of checking the Hawkbit maven"
echo "dependencies using the Dash License Tool."
echo ""
echo "Usage: $0 <org.eclipse.dash.licenses jar path> [<other dash-tool parameters>..]"
exit 1
fi
HAWKBIT_MAVEN_DEPS=".3rd-party/hawkbit-maven.deps"
DEPENDENCIES=".3rd-party/DEPENDENCIES"
mvn dependency:list \
-DexcludeGroupIds=org.eclipse,org.junit \
-pl '!org.eclipse.hawkbit:hawkbit-repository-test,!org.eclipse.hawkbit:hawkbit-dmf-rabbitmq-test' | \
grep -Poh "\S+:(runtime|compile|provided)" | \
sed -e 's/^\(.*\)\:.*$/\1/' | \
sort | \
uniq > $HAWKBIT_MAVEN_DEPS
java -Dorg.eclipse.dash.timeout=60 -jar "${DASH_LICENSE_JAR}" -batch 90 -summary ${DEPENDENCIES} ${HAWKBIT_MAVEN_DEPS} "$@"
sort -o ${DEPENDENCIES} ${DEPENDENCIES}