Skip to content

Commit

Permalink
Merge pull request #2 from galasa-dev/mcobbett-fix-add-version-script…
Browse files Browse the repository at this point in the history
…-to-update-readme

add-version script now updates the readme version examples correctly.
  • Loading branch information
techcobweb authored Oct 17, 2024
2 parents 3147afb + 8c7dbb6 commit e82f640
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Casks/g/galasactl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment. Latest version"
desc "Command-line client for Galasa. Latest version"
homepage "https://galasa.dev/"

livecheck do
Expand Down
2 changes: 1 addition & 1 deletion Casks/g/galasactl@0.36.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment. Version 0.36.0"
desc "Command-line client for Galasa. Version 0.36.0"
homepage "https://galasa.dev/"

livecheck do
Expand Down
2 changes: 1 addition & 1 deletion Casks/g/galasactl@0.37.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment. Version 0.37.0"
desc "Command-line client for Galasa. Version 0.37.0"
homepage "https://galasa.dev/"

livecheck do
Expand Down
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 e82f640

Please sign in to comment.