-
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.
- Loading branch information
Showing
15 changed files
with
86 additions
and
28 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 was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
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
Binary file not shown.
Empty file.
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 @@ | ||
�ѕ4��i�[�W����i��{�X7L�O�Ӎt��T��WB�Bl~P�j��J5��{���H7�� |
Binary file not shown.
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 |
---|---|---|
@@ -1,20 +1,37 @@ | ||
#!/bin/bash | ||
|
||
KEY_PATH="Tuist/master.key" | ||
SECRETS_DIR="Targets/Keyme/Encrypted" | ||
OUTPUT_DIR="Targets/Keyme/Resources/Secrets" | ||
|
||
ENCRYPTED_DIR="Encrypted" | ||
SECRET_DIR="Secrets" | ||
|
||
OUTPUT_DIR="Projects/Keyme/Resources/Secrets" | ||
XCCONFIG_APP_DIR="XCConfig/App" | ||
XCCONFIG_TARGET_DIR="XCConfig/Target" | ||
|
||
# Find all non-hidden files in the secrets directory that don't have the .encrypted extension | ||
files=($(find ${OUTPUT_DIR} -type f ! -name ".*" ! -name "*.encrypted")) | ||
xcconfigAppFiles=($(find ${XCCONFIG_APP_DIR} -type f ! -name ".*" ! -name "*.encrypted")) | ||
xcconfigTargetFiles=($(find ${XCCONFIG_TARGET_DIR} -type f ! -name ".*" ! -name "*.encrypted")) | ||
|
||
allFiles=("${files[@]}" "${xcconfigAppFiles[@]}" "${xcconfigTargetFiles[@]}" ) | ||
|
||
# Loop through the array and encrypt each file | ||
for file in "${files[@]}" | ||
for file in "${allFiles[@]}" | ||
do | ||
# Extract the filename from the file path | ||
filename=$(basename $file) | ||
|
||
if [[ $file == *"$XCCONFIG_APP_DIR"* ]]; then | ||
out_dir="${XCCONFIG_APP_DIR}" | ||
elif [[ $file == *"$XCCONFIG_TARGET_DIR"* ]]; then | ||
out_dir="${XCCONFIG_TARGET_DIR}" | ||
else | ||
out_dir="${SECRET_DIR}" | ||
fi | ||
|
||
# Create the output file path by appending the filename to the output directory | ||
out_file="${SECRETS_DIR}/${filename}.encrypted" | ||
out_file="${ENCRYPTED_DIR}/${out_dir}/${filename}.encrypted" | ||
|
||
openssl enc -aes-256-cbc -nosalt -in $file -out $out_file -pass file:${KEY_PATH} | ||
done |
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,29 @@ | ||
// | ||
// AppScheme.swift | ||
// ProjectDescriptionHelpers | ||
// | ||
// Created by 김영인 on 2023/07/26. | ||
// | ||
|
||
import ProjectDescription | ||
|
||
import EnvPlugin | ||
|
||
extension Project { | ||
static let appScheme: [Scheme] = [ | ||
.init(name: "\(Environment.appName)-DEV", | ||
buildAction: .buildAction(targets: ["\(Environment.appName)"]), | ||
runAction: .runAction(configuration: "DEV"), | ||
archiveAction: .archiveAction(configuration: "DEV"), | ||
profileAction: .profileAction(configuration: "DEV"), | ||
analyzeAction: .analyzeAction(configuration: "DEV") | ||
), | ||
.init(name: "\(Environment.appName)-PROD", | ||
buildAction: .buildAction(targets: ["\(Environment.appName)"]), | ||
runAction: .runAction(configuration: "PROD"), | ||
archiveAction: .archiveAction(configuration: "PROD"), | ||
profileAction: .profileAction(configuration: "PROD"), | ||
analyzeAction: .analyzeAction(configuration: "PROD") | ||
) | ||
] | ||
} |