You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.
The proposed run script build phase in the Readme will re-generate Storyboards.swift at each build.
The generation in itself is long. Add to this that Xcode have to re-compile the generated file each time, it took me three builds to get annoyed…
Here’s a proposed script that detects whether re-generating the file is actually needed before re-generating it.
echo "Natalie Generator: Determining if generated Swift file is up-to-date."
NATALIE_PATH="$PROJECT_DIR/Dependencies/natalie/natalie.swift"
GO=0
BASE_PATH="$PROJECT_DIR/$PROJECT_NAME"
OUTPUT_PATH="$BASE_PATH/Storyboards.swift"
if [ ! -e "$OUTPUT_PATH" ]; then
GO=1
elif [ -n "$(find "$BASE_PATH" -type f -name "*.storyboard" -newer "$OUTPUT_PATH" -print -quit)" ]; then
GO=1
fi
if [ $GO -eq 1 ]; then
echo "Natalie Generator: Generated Swift is out-of-date; re-generating..."
"$NATALIE_PATH" "$PROJECT_DIR/$PROJECT_NAME" >"$OUTPUT_PATH"
echo "Natalie Generator: Done."
else
echo "Natalie Generator: Generated Swift is up-to-date; skipping re-generation."
fi
The text was updated successfully, but these errors were encountered:
The proposed run script build phase in the Readme will re-generate
Storyboards.swift
at each build.The generation in itself is long. Add to this that Xcode have to re-compile the generated file each time, it took me three builds to get annoyed…
Here’s a proposed script that detects whether re-generating the file is actually needed before re-generating it.
The text was updated successfully, but these errors were encountered: