showwin / speedtest-go

CLI and Go API to Test Internet Speed using speedtest.net
MIT License
565 stars 115 forks source link

'speedtest-go --version' no longer outputs an x.y.z string in speedtest-go (>= 1.7.7) #232

Closed HenrikBengtsson closed 1 month ago

HenrikBengtsson commented 1 month ago

Starting with speedtest-go 1.7.7, I no longer get pure x.y.z numeric output, but:

$ speedtest-go --version
speedtest-go v1.7.9 git-dd78c65 built at 2024-09-04T11:40:23Z

$ speedtest-go --version
speedtest-go v1.7.7 git-8e02144 built at 2024-05-16T11:07:08Z

$ speedtest-go --version
1.7.6

$ speedtest-go --version
1.6.10

Since it's not mentioned in the change log, I suspect this is a mistake.

r3inbowari commented 1 month ago

chore: add hash commit and date for release (#217)

sorry, it's not a mistake. it just forgot to write into the changelog.

HenrikBengtsson commented 1 month ago

Oh, I see.

My need stems from grabbing the x.y.z version, so I can compare it fixed version. FWIW, I can work around it via:

version=$(speedtest-go --version 2>&1 | sed -E 's/(.* v| .*)//g')