Fix bazelisk and mercurial output in readme (#518)

* fix output

* fix bazelisk output on ubuntu
This commit is contained in:
Mikhail Timofeev
2020-03-08 09:28:50 +00:00
committed by GitHub
parent 33c5e7d36e
commit 531fe345a2
3 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ if ! command -v bazelisk; then
fi fi
# Document what was added to the image # Document what was added to the image
bazelisk_version = $(bazelisk version | grep "Bazelisk version:" | cut -d ":" -f 2) bazelisk_version="$(bazelisk version 2>null | grep "Bazelisk version:" | cut -d "v" -f 3)"
echo "Lastly, documenting what we added to the metadata file" echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "Bazel ($(bazel --version))" DocumentInstalledItem "Bazel ($(bazel --version))"

View File

@@ -33,7 +33,7 @@ _Version:_ $(bazel --version)<br/>
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description
# Adding description of Bazelisk to Markdown # Adding description of Bazelisk to Markdown
$bazelisk_version = (bazelisk version | Select-String "Bazelisk version:").Split(":")[1] $bazelisk_version = ((bazelisk version | Select-String "Bazelisk version:") -Split(" v"))[2]
$SoftwareName = "bazelisk" $SoftwareName = "bazelisk"

View File

@@ -15,7 +15,7 @@ else
# Adding description of the software to Markdown # Adding description of the software to Markdown
$SoftwareName = "Mercurial" $SoftwareName = "Mercurial"
$(hg --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+\.\d+" $(hg --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+"
$MercurialVersion = $matches[0] $MercurialVersion = $matches[0]
$Description = @" $Description = @"