From b08b5e6fa63b570ce535044165479ba3963c54e9 Mon Sep 17 00:00:00 2001 From: Balazs Nadasdi Date: Mon, 13 Nov 2023 15:33:22 +0100 Subject: [PATCH] chore(scripting): a simple script to bump libcrypto3 and libssl3 version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simple usage: ``` ❯ ./tools/bump-libcrypto3-libssl3.sh 3.1.4-r1 --> Old version: 3.1.4-r0 --> New version: 3.1.4-r1 Press ^C to exit or any key to continue... ``` Signed-off-by: Balazs Nadasdi --- tools/bump-libcrypto3-libssl3.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 tools/bump-libcrypto3-libssl3.sh diff --git a/tools/bump-libcrypto3-libssl3.sh b/tools/bump-libcrypto3-libssl3.sh new file mode 100755 index 00000000..3012ef39 --- /dev/null +++ b/tools/bump-libcrypto3-libssl3.sh @@ -0,0 +1,29 @@ +#!/usr/bin/bash + +files=( + Makefile + Tiltfile + .github/workflows/release-runners.yaml + .github/workflows/release.yaml + .github/workflows/build-and-publish.yaml +) + +old=$(grep "LIBCRYPTO_VERSION ?= " Makefile | cut -d ' ' -f 3) +new=${1:-} + + +if [ "${old}" == "" -o "${new}" == "" ]; then + echo "$0 " + exit 1 +fi + +echo " --> Old version: ${old}" +echo " --> New version: ${new}" + +echo "" +echo "Press ^C to exit or any key to continue..." +read + +for f in "${files[@]}"; do + sed -i "s/${old}/${new}/g" "${f}" +done