forked from EthanLipnik/OpenSesame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a BuildConfiguration target, which is used as dependency. The bui…
…ld target runs the GenerateBuildConfig.sh to autogenerate a Swift file that exposes compile time values for the APPGROUP amongst others
- Loading branch information
Showing
4 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
# GenerateBuildConfig.sh | ||
# OpenSesame | ||
# | ||
# Created by Robert Shand on 2021-09-11. | ||
# | ||
echo "//Generated file please do not edit" | ||
printf "//\n//\n//generated by GenerateBuildConfig.sh\n" | ||
printf "import Foundation\n\n" | ||
echo "struct OpenSesameConfig { " | ||
echo " fileprivate init() {}" | ||
env |\ | ||
grep "OPENSESAME_BUILDCONFIG_" | \ | ||
sed "s/OPENSESAME_BUILDCONFIG_/ static let /" | \ | ||
sed -E 's/=(.*)/ = "\1"/' | \ | ||
sed -E 's/"http.*/URL(string:&)!/' | ||
echo "}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters