Commit bf8889e4 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Kateryna Kostiuk

build: remove version check for swiftgen

Change-Id: Ia2937490bf64c9aa8ce3ccc9c6679da6358b58d9
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent 8cb78b7a
#!/bin/bash
EXPECTED_VERSION="SwiftGen v5.1.1 (Stencil v0.9.0, StencilSwiftKit v2.1.0, SwiftGenKit v2.1.0)"
# Here execute the various SwiftGen commands you need
run_swiftgen() {
......@@ -14,16 +13,8 @@ run_swiftgen() {
swiftgen strings -t structured-swift3 "$SRCDIR/Resources/en.lproj/Localizable.strings" --output "$OUTDIR/Strings.swift"
}
# Main script to check if SwiftGen is installed, check the version, and run it only if version matches
if which swiftgen >/dev/null; then
CURRENT_VERSION=`swiftgen --version`
if [ "$CURRENT_VERSION" != "$EXPECTED_VERSION" ]; then
echo "error: SwiftGen version mismatch (expected ${EXPECTED_VERSION%% \(*\)}, got ${CURRENT_VERSION%% \(*\)})"
exit 1
fi
run_swiftgen
else
echo "warning: SwiftGen not installed, download it from https://github.com/SwiftGen/SwiftGen"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment