Skip to content

Commit

Permalink
Add script and make adjustments for Xcode Cloud
Browse files Browse the repository at this point in the history
- Add post clone script to write private xcconfig files
- Update paths to private xcconfig files
  • Loading branch information
dempseyatgithub committed Jun 10, 2023
1 parent c59b087 commit 3c541f8
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
10 changes: 10 additions & 0 deletions BuildSettingExtractor.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
53BC11301A817447005E2FD2 /* BuildSettingCommentGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuildSettingCommentGenerator.m; sourceTree = "<group>"; };
53C7618023F85AE20024B432 /* SampleFileStructureGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleFileStructureGenerator.h; sourceTree = "<group>"; };
53C7618123F85AE20024B432 /* SampleFileStructureGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SampleFileStructureGenerator.m; sourceTree = "<group>"; };
53CCCAC62A34B876009C699E /* ci_post_clone.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = ci_post_clone.sh; sourceTree = "<group>"; };
53D8DADE291EAD230092FF3E /* AppConfig.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppConfig.xcconfig; sourceTree = "<group>"; };
53DCD48924D6440400D512FB /* BuildSettingExtractor.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = BuildSettingExtractor.xctestplan; sourceTree = "<group>"; };
53F372EB1A7BC6A7006118CB /* DragFileView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragFileView.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -137,6 +138,7 @@
53719E9819BF4C6D005D3DE0 /* BuildSettingExtractor */,
53719EB619BF4C6D005D3DE0 /* BuildSettingExtractorTests */,
532C57C6234BB32700FA0872 /* Config */,
53CCCAC82A34B88B009C699E /* ci_scripts */,
53719E9119BF4C6D005D3DE0 /* Frameworks */,
53719E9019BF4C6D005D3DE0 /* Products */,
5395AF4D1A7C6BB60028BE88 /* ReadMe.md */,
Expand Down Expand Up @@ -246,6 +248,14 @@
path = Preferences;
sourceTree = "<group>";
};
53CCCAC82A34B88B009C699E /* ci_scripts */ = {
isa = PBXGroup;
children = (
53CCCAC62A34B876009C699E /* ci_post_clone.sh */,
);
path = ci_scripts;
sourceTree = "<group>";
};
53F372F61A7C3164006118CB /* TestFiles */ = {
isa = PBXGroup;
children = (
Expand Down
2 changes: 1 addition & 1 deletion Config/AppConfig.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ PRODUCT_BUNDLE_IDENTIFIER = net.tapas-software.${PRODUCT_NAME:rfc1034identifier}


// Allows private app config information to be set and overridden for production builds
#include? "Private/PrivateAppConfig.xcconfig"
#include? "PrivateAppConfig.xcconfig"

2 changes: 1 addition & 1 deletion Config/ProjectConfig.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ CODE_SIGN_IDENTITY = Apple Development


// Allows private project config information to be set and overridden for production builds
#include? "Private/PrivateProjectConfig.xcconfig"
#include? "PrivateProjectConfig.xcconfig"
27 changes: 27 additions & 0 deletions ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# ci_post_clone.sh
# CloudBuildTestbed
#
# Created by James Dempsey on 6/10/23.
#

if [ $CI = "TRUE" ]; then

# Write private project configuration file
privateProjectConfigPath="$CI_WORKSPACE/Config/PrivateProjectConfig.xcconfig"

cat > $privateProjectConfigPath <<- EOF
DEVELOPMENT_TEAM = $TS_DEVELOPMENT_TEAM
EOF

# Write private app configuration file
privateAppConfigPath="$CI_WORKSPACE/Config/PrivateAppConfig.xcconfig"

cat > $privateAppConfigPath <<- EOF
PRODUCT_BUNDLE_IDENTIFIER = $TS_PRODUCT_BUNDLE_IDENTIFIER
EOF

else
echo "CI env variable was not TRUE"
fi

0 comments on commit 3c541f8

Please sign in to comment.