As of the current version (2.2), running Baseline.sh --version results in the following output:
+/usr/local/Baseline/Baseline.sh:19> [ --version '=' --version ']'
+/usr/local/Baseline/Baseline.sh:20> basename /usr/local/Baseline/Baseline.sh
+/usr/local/Baseline/Baseline.sh:20> echo 'Baseline.sh by Second Son Consulting - v. 2.2'
Baseline.sh by Second Son Consulting - v. 2.2
+/usr/local/Baseline/Baseline.sh:21> exit 0
As part of my dependency automation and local state management efforts, I'd like to be able to easily gather the version of baseline currently installed on a device. The current output adds some complexity to this. In order to get just the script version, something like the following is required: Baseline.sh --version 2>/dev/null | awk '{print $NF}', which then results in simply 2.2 as desired.
The workaround isn't unreasonable, but I'm of the opinion that version arguments for scripts and binaries should be as terse as possible, only returning the relevant version data.
I'm happy to DIY and pop in a PR to resolve this issue if you'd prefer.
As of the current version (
2.2
), runningBaseline.sh --version
results in the following output:As part of my dependency automation and local state management efforts, I'd like to be able to easily gather the version of baseline currently installed on a device. The current output adds some complexity to this. In order to get just the script version, something like the following is required:
Baseline.sh --version 2>/dev/null | awk '{print $NF}'
, which then results in simply2.2
as desired.The workaround isn't unreasonable, but I'm of the opinion that version arguments for scripts and binaries should be as terse as possible, only returning the relevant version data.
I'm happy to DIY and pop in a PR to resolve this issue if you'd prefer.
Thanks!