Skip to content

Commit 237c59c

Browse files
add dotnet agent version (#361)
1 parent eb15037 commit 237c59c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dotnet/publish-layers.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ function get_agent {
7979
elif [[ "${GITHUB_REF_NAME}" =~ ${VERSION_REGEX} ]]; then
8080
# Extract the version number from the GITHUB_REF_NAME using regex
8181
NEWRELIC_AGENT_VERSION="${BASH_REMATCH[1]}"
82+
echo "$NEWRELIC_AGENT_VERSION" > version.txt
8283
echo "Detected NEWRELIC_DOTNET_AGENT_VERSION: ${NEWRELIC_AGENT_VERSION}"
8384
else
8485
echo "Unable to determine Dotnet agent version, GITHUB_REF_NAME environment variable did not match regex. GITHUB_REF_NAME: ${GITHUB_REF_NAME}" >&2
@@ -90,6 +91,7 @@ function get_agent {
9091
curl -L $url -o $AGENT_DIST_ZIP
9192
mkdir -p $BUILD_DIR
9293
tar -xvf $AGENT_DIST_ZIP -C ./$BUILD_DIR # under $BUILD_DIR/newrelic-dotnet-agent
94+
cp version.txt $BUILD_DIR/newrelic-dotnet-agent/version.txt
9395
rm -f $AGENT_DIST_ZIP
9496
}
9597

0 commit comments

Comments
 (0)