From aab98c4fb9a80e6e070a647dc65a5aae094af83a Mon Sep 17 00:00:00 2001 From: Mike Cobbett <77053+techcobweb@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:21:55 +0100 Subject: [PATCH] add-version script now updates the readme version examples correctly. Signed-off-by: Mike Cobbett <77053+techcobweb@users.noreply.github.com> --- README.md | 6 +++--- add-version.sh | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bb06361..a3800b7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ `brew install galasa-dev/tap/` -Or `brew tap galasa-dev/tap` and then `brew install `. +Or `brew tap galasa-dev/tap` and then `brew install --no-quarantine `. ## Casks Currently different version of casks for the Galasa Command-Line interface (galasactl). To install the latest version use the following command @@ -20,7 +20,7 @@ brew install --no-quarantine galasactl@x.xx.x ``` for example ``` -brew install --no-quarantine galasactl@0.36.0 +brew install --no-quarantine galasactl@0.37.0 ``` At the moment the --no-quarantine is required because otherwise its not possible to run the galasactl. See documentation about this at @@ -31,7 +31,7 @@ Use the helper script `add-version.sh` For example: ```bash -./add-version.sh --version 0.36.0 +./add-version.sh --version 0.37.0 ``` The file Cask/g/galasactl.rb will be updated with that version, so people can get that as the latest version. diff --git a/add-version.sh b/add-version.sh index 4d2fd81..c3ead01 100755 --- a/add-version.sh +++ b/add-version.sh @@ -156,9 +156,8 @@ EOF function update_readme_example() { h2 "Updating the example in the readme." - cat $BASEDIR/README.md | sed "s/brew install --no-quarantine galasactl@[0-9.]+/brew install --no-quarantine galasactl@${version_to_add}/1" > ${BASEDIR}/temp/README1.md - cat ${BASEDIR}/temp/README1.md | sed "s/add-version.sh --version .* /add-version.sh --version ${version_to_add}/1" > ${BASEDIR}/temp/README2.md - mv ${BASEDIR}/temp/README2.md ${BASEDIR}/README.md + cat $BASEDIR/README.md | sed -E "s/[0-9]+[0-9\.]*/${version_to_add}/g" > ${BASEDIR}/temp/README1.md + mv ${BASEDIR}/temp/README1.md ${BASEDIR}/README.md success "Readme updated OK." }