Skip to content

Commit fae2fce

Browse files
rtg0795tf-text-github-robot
authored andcommitted
Fix scraping full commit from short commit sha
PiperOrigin-RevId: 509623086
1 parent 43d9ebe commit fae2fce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oss_scripts/prepare_tf_dep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [[ "${osname}" == "darwin" ]]; then
2828
else
2929
short_commit_sha=$(echo $short_commit_sha | grep -oP '(?<=-g)[0-9a-f]*$')
3030
fi
31-
commit_sha=$(curl -SsL https://github.com/tensorflow/tensorflow/commit/${short_commit_sha} | grep sha-block | grep commit | sed -e 's/.*\([a-f0-9]\{40\}\).*/\1/')
31+
commit_sha=$(curl -SsL https://github.com/tensorflow/tensorflow/commit/${short_commit_sha} | grep "Browse the repository" | sed -e 's/.*\([a-f0-9]\{40\}\).*/\1/')
3232

3333
# Update TF dependency to installed tensorflow
3434
sed -E -i $ext "s/strip_prefix = \"tensorflow-2.+\",/strip_prefix = \"tensorflow-${commit_sha}\",/" WORKSPACE

0 commit comments

Comments
 (0)