Skip to content

Commit 2c5aca0

Browse files
rtg0795tf-text-github-robot
authored andcommitted
Change strip_prefix logic to grab sha256 properly
PiperOrigin-RevId: 859145232
1 parent 9eb9725 commit 2c5aca0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

oss_scripts/prepare_tf_dep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ fi
4242
echo "Updating WORKSPACE file to use TensorFlow commit $commit_slug"
4343
sed -E -i $ext "s/strip_prefix = \"tensorflow-.+\",/strip_prefix = \"tensorflow-${commit_slug}\",/" WORKSPACE
4444
sed -E -i $ext "s|\"https://github.com/tensorflow/tensorflow/archive/.+\.zip\"|\"https://github.com/tensorflow/tensorflow/archive/${commit_slug}.zip\"|" WORKSPACE
45-
prev_shasum=$(grep -A 1 -e "strip_prefix.*tensorflow-" WORKSPACE | tail -1 | awk -F '"' '{print $2}')
45+
prev_shasum=$(grep -B 1 -e "strip_prefix.*tensorflow-" WORKSPACE | grep "sha256" | cut -d'"' -f2)
4646
sed -i $ext "s/sha256 = \"${prev_shasum}\",//" WORKSPACE

0 commit comments

Comments
 (0)