Skip to content

Commit

Permalink
add-version script now updates the readme version examples correctly.
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Cobbett <77053+techcobweb@users.noreply.github.com>
  • Loading branch information
techcobweb committed Sep 27, 2024
1 parent b933bde commit aab98c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

`brew install galasa-dev/tap/<cask>`

Or `brew tap galasa-dev/tap` and then `brew install <cask>`.
Or `brew tap galasa-dev/tap` and then `brew install --no-quarantine <cask>`.

## Casks
Currently different version of casks for the Galasa Command-Line interface (galasactl). To install the latest version use the following command
Expand All @@ -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
Expand All @@ -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.
Expand Down
5 changes: 2 additions & 3 deletions add-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}

Expand Down

0 comments on commit aab98c4

Please sign in to comment.