Skip to content

Commit

Permalink
fixed problems running verify
Browse files Browse the repository at this point in the history
  • Loading branch information
dhilpipre committed Jul 26, 2022
1 parent 750f398 commit 057b877
Showing 1 changed file with 30 additions and 97 deletions.
127 changes: 30 additions & 97 deletions newrelic-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,116 +5,49 @@ then
mkdir libs
fi

INSTRUMENTATION_TEST_BUILT="newrelic-agent/instrumentation-test/build/libs/instrumentation-test-*-SNAPSHOT.jar"
AGENT_INTERFACES_BUILT="newrelic-agent/agent-interfaces/build/libs/agent-interfaces-*-SNAPSHOT.jar"
AGENT_MODEL_BUILT="newrelic-agent/agent-model/build/libs/agent-model-*-SNAPSHOT.jar"
AGENT_BRIDGE_BUILT="newrelic-agent/agent-bridge/build/libs/agent-bridge-*-SNAPSHOT.jar"
AGENT_BRIDGE_DS_BUILT="newrelic-agent/agent-bridge-datastore/build/libs/agent-bridge-datastore-*-SNAPSHOT.jar"

INSTRUMENTATION_TEST_LIBS="libs/instrumentation-test-*-SNAPSHOT.jar"
AGENT_INTERFACES_LIBS="libs/agent-interfaces-*-SNAPSHOT.jar"
AGENT_MODEL_LIBS="libs/agent-model-*-SNAPSHOT.jar"
AGENT_BRIDGE_LIBS="libs/agent-bridge-6*-SNAPSHOT.jar"
AGENT_BRIDGE_DS_LIBS="libs/agent-bridge-datastore-*-SNAPSHOT.jar"
AGENT_DOWNLOADED="libs/newrelic-agent-*.jar"

AGENT_BRIDGE_LIBS="libs/agent-bridge.jar"
AGENT_BRIDGE_DS_LIBS="libs/agent-bridge-datastore.jar"

function checkForFiles {
if [ ! -f $INSTRUMENTATION_TEST_LIBS ];
then
echo "Did not find file Instrumentation Test Jar in libs"
if [ ! -f $INSTRUMENTATION_TEST_BUILT ];
then
buildInstrumentationTest
fi
cp $INSTRUMENTATION_TEST_BUILT libs/
fi
if [ ! -f $AGENT_INTERFACES_LIBS ];
if [ ! -f $AGENT_BRIDGE_LIBS ];
then
if [ ! -f $AGENT_INTERFACES_BUILT ];
then
buildAgentInterfaces
fi
cp $AGENT_INTERFACES_BUILT libs/
getAgentBridge
fi
if [ ! -f $AGENT_MODEL_LIBS ];
if [ ! -f $AGENT_BRIDGE_DS_LIBS ];
then
if [ ! -f $AGENT_MODEL_BUILT ];
then
buildAgentModel
fi
cp $AGENT_MODEL_BUILT libs/
fi
if [ ! -f $AGENT_BRIDGE_LIBS ];
then
if [ ! -f $AGENT_BRIDGE_BUILT ];
then
buildAgentBridge
fi
cp $AGENT_BRIDGE_BUILT libs/
fi
if [ ! -f $AGENT_BRIDGE_DS_LIBS ];
then
if [ ! -f $AGENT_BRIDGE_DS_BUILT ];
then
buildAgentBridgeDatastore
fi
cp $AGENT_BRIDGE_DS_BUILT libs/
getAgentBridgeDatastore
fi
}

function buildInstrumentationTest {
cd newrelic-agent
# Removes the unnecessary includes of instrumentation projects
grep -v "include 'instrumentation:" settings.gradle > temp && mv temp settings.gradle

./gradlew instrumentation-test:jar

cp instrumentation-test/build/libs/* ../libs/
cd ..
function downloadAgent {
./gradlew getAgent
./gradlew extractJars
./gradlew cleanUp
}

function buildAgentInterfaces {
cd newrelic-agent
# Removes the unnecessary includes of instrumentation projects
grep -v "include 'instrumentation:" settings.gradle > temp && mv temp settings.gradle

./gradlew agent-interfaces:jar

cp agent-interfaces/build/libs/* ../libs/
cd ..
function getAgentBridge {
if [ ! -f $AGENT_DOWNLOADED ];
then
downloadAgent
fi
if [ ! -f $AGENT_BRIDGE_LIBS ];
then
echo "Download of Agent and extraction of Agent Bridge failed"
fi
}

function buildAgentModel {
cd newrelic-agent
# Removes the unnecessary includes of instrumentation projects
grep -v "include 'instrumentation:" settings.gradle > temp && mv temp settings.gradle

./gradlew agent-model:jar

cp agent-model/build/libs/* ../libs/
cd ..
}

function buildAgentBridge {
cd newrelic-agent
# Removes the unnecessary includes of instrumentation projects
grep -v "include 'instrumentation:" settings.gradle > temp && mv temp settings.gradle

./gradlew agent-bridge:jar

cp agent-bridge/build/libs/* ../libs/
cd ..
}

function buildAgentBridgeDatastore {
cd newrelic-agent
# Removes the unnecessary includes of instrumentation projects
grep -v "include 'instrumentation:" settings.gradle > temp && mv temp settings.gradle

./gradlew agent-bridge-datastore:jar

cp agent-bridge-datastore/build/libs/* ../libs/
cd ..
function getAgentBridgeDatastore {
if [ ! -f $AGENT_DOWNLOADED ];
then
downloadAgent
fi
if [ ! -f $AGENT_BRIDGE_DS_LIBS ];
then
echo "Download of Agent and extraction of Agent Bridge Datastore failed"
fi
}

checkForFiles

0 comments on commit 057b877

Please sign in to comment.