Skip to content

Commit

Permalink
chore: Always use latest release for .NET (newrelic#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
chynesNR authored Jul 22, 2024
1 parent c1d9b32 commit 3a3eb14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/publish-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
id: dotnet-check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_dotnet ]]; then
AGENT_VERSION=$( echo ${{ github.event.ref }} | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" )
echo "version=$AGENT_VERSION" >> $GITHUB_OUTPUT
echo "match=true" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v4
Expand Down
8 changes: 2 additions & 6 deletions dotnet/publish-layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,18 @@ function publish-dotnet-arm64 {
done
}

# exmaple https://download.newrelic.com/dot_net_agent/latest_release/newrelic-dotnet-agent_10.22.0_amd64.tar.gz
# exmaple https://download.newrelic.com/dot_net_agent/latest_release/newrelic-dotnet-agent_amd64.tar.gz
function get_agent {
arch=$1

url="https://download.newrelic.com/dot_net_agent/latest_release/newrelic-dotnet-agent_${AGENT_VERSION}_${arch}.tar.gz"
url="https://download.newrelic.com/dot_net_agent/latest_release/newrelic-dotnet-agent_${arch}.tar.gz"
rm -rf $AGENT_DIST_ZIP
curl -L $url -o $AGENT_DIST_ZIP
mkdir -p $BUILD_DIR
tar -xvf $AGENT_DIST_ZIP -C ./$BUILD_DIR # under $BUILD_DIR/newrelic-dotnet-agent
rm -f $AGENT_DIST_ZIP
}

if [ -z $AGENT_VERSION ]; then
echo "Missing required AGENT_VERSION environment variable: ${AGENT_VERSION}."
exit 1
fi

build-dotnet-arm64
publish-dotnet-arm64
Expand Down

0 comments on commit 3a3eb14

Please sign in to comment.