Skip to content

Commit 86e8fe8

Browse files
authored
Add support to releases list (#2200)
* Add support to releases list * Add stdout usage
1 parent 40c3e2a commit 86e8fe8

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

tools/update_release_version.sh

+24-5
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,32 @@
1515
# limitations under the License.
1616
# ==============================================================================
1717

18-
# usage: bash tools/update_release_version.sh <release_number>
18+
# Usage
19+
if [ $# -lt 1 ]; then
20+
echo "Usage: bash tools/update_release_version.sh <list_of_release_numbers>"
21+
echo "e.g. bash tools/update_release_version.sh 2.3.0 2.3.1"
22+
exit 1
23+
fi
1924

20-
sed -ri "s/(TF_VERSION=|tensorflow(-cpu)*(~|=)=|tf-version: \[')[0-9]+[a-zA-Z0-9_.-]+/\1$1/g" \
21-
.github/workflows/release.yml \
25+
last_version=${BASH_ARGV[0]}
26+
tf_version=''
27+
for ver in $@
28+
do
29+
if [ -z $tf_version ]; then
30+
tf_version="'$ver'"
31+
else
32+
tf_version="$tf_version, '$ver'"
33+
fi
34+
done
35+
echo $tf_version
36+
echo $last_version
37+
sed -ri "s/(tf-version: \[)'.+'/\1$tf_version/g" \
38+
.github/workflows/release.yml
39+
sed -ri "s/(tensorflow(-cpu)*(~|=)=)[0-9]+[a-zA-Z0-9_.-]+/\1$1/g" \
2240
CONTRIBUTING.md \
23-
tools/docker/cpu_tests.Dockerfile \
2441
tools/install_deps/tensorflow-cpu.txt \
25-
tools/install_deps/tensorflow.txt \
42+
tools/install_deps/tensorflow.txt
43+
sed -ri "s/(TF_VERSION=)\S+/\1$last_version/g" \
44+
tools/docker/cpu_tests.Dockerfile \
2645
tools/run_gpu_tests.sh \
2746
tools/build_dev_container.sh

0 commit comments

Comments
 (0)