Skip to content

Commit

Permalink
Make script executable
Browse files Browse the repository at this point in the history
  • Loading branch information
harrism committed Nov 9, 2023
1 parent 4743b62 commit e7cb06f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ci/utils/rapids-pr-artifact-path.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# Echos path to an artifact for a specific PR. It uses the latest commit on the PR.
#
# Positional Arguments:
# 1) repo name
# 2) PR number
# 3) cpp or python
#
#
# Example Usage:
# rapids-pr-artifact-path rmm 1095 cpp

set -euo pipefail

repo="$1"
pr="$2"
commit=$(git ls-remote https://github.com/rapidsai/${repo}.git refs/heads/pull-request/${pr} | cut -c1-7)

RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
PYTHON_MINOR_VERSION=$(python --version | sed -E 's/Python [0-9]+\.([0-9]+)\.[0-9]+/\1/g')

if [[ $3 == "cpp" ]]
then
echo $(rapids-get-artifact ci/${repo}/pull-request/${pr}/${commit}/rmm_conda_cpp_cuda${RAPIDS_CUDA_MAJOR}_$(arch).tar.gz)
else
echo $(rapids-get-artifact ci/${repo}/pull-request/${pr}/${commit}/rmm_conda_python_cuda${RAPIDS_CUDA_MAJOR}_3${PYTHON_MINOR_VERSION}_$(arch).tar.gz)
fi

0 comments on commit e7cb06f

Please sign in to comment.