Files
SwiftFormat/Scripts/get-version.sh
2022-07-13 22:01:40 +01:00

13 lines
233 B
Bash
Executable File

#!/bin/sh
set -e
REGEX="let swiftFormatVersion = \"([0-9]+.[0-9]+.[0-9]+)\""
while IFS= read -r line; do
if [[ $line =~ $REGEX ]]
then
echo "${BASH_REMATCH[1]}"
break
fi
done < Sources/SwiftFormat.swift