Skip to content

Commit

Permalink
Fix jq error and master not found issue
Browse files Browse the repository at this point in the history
  • Loading branch information
celinval committed Jan 3, 2025
1 parent 0ebb862 commit 35eaf92
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/check_rustc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ cd "$REPO_DIR"
# Get the commit ID from rustc --version
echo "Retrieving commit ID..."
COMMIT_ID=$(rustc --version | sed -e "s/.*(\(.*\) .*/\1/")
echo "$COMMIT_ID for rustc is"

# Get the full commit ID for shallow clone
curl -H "Connection: close" -o "${TMP_RUST_DIR}/output.json" -s --show-error \
echo "Full commit id for $COMMIT_ID for is:"
curl -o "${TMP_RUST_DIR}/output.json" -s --show-error \
"https://api.github.com/repos/rust-lang/rust/commits?sha=${COMMIT_ID}&per_page=1"
COMMIT_ID=$(jq -r '.[0].sha' "${TMP_RUST_DIR}/output.json")
COMMIT_ID=$(cat "${TMP_RUST_DIR}/output.json" | jq -r '.[0].sha')
echo "- $COMMIT_ID"

# Clone the rust-lang/rust repository
echo "Cloning rust-lang/rust repository into ${TMP_RUST_DIR}..."
Expand All @@ -74,6 +75,8 @@ cp -r "${REPO_DIR}/library" "${TMP_RUST_DIR}"
pushd "${TMP_RUST_DIR}"
./configure --set=llvm.download-ci-llvm=true
export RUSTFLAGS="--check-cfg cfg(kani) --check-cfg cfg(feature,values(any()))"
export RUST_BACKTRACE=1
unset GITHUB_ACTIONS # Bootstrap script requires specific repo layout when run from an action. Disable that.

# Run tidy
if [ "${TIDY_MODE}" == "--bless" ];
Expand Down

0 comments on commit 35eaf92

Please sign in to comment.