Skip to content

Commit 831807d

Browse files
committed
fix/#103: 빌드 버전 자동 증가 run script 추가
- 빌드 번호 증가를 위한 Actions step 제거
1 parent 0be45d3 commit 831807d

File tree

3 files changed

+35
-15
lines changed

3 files changed

+35
-15
lines changed

.github/workflows/deploy_on_release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ jobs:
7878
cp "./$PROVISION" "$HOME/Library/MobileDevice/Provisioning Profiles/$UUID.mobileprovision"
7979
done
8080
81-
- name: 🔢 Bump Build Number
82-
run: |
83-
BUILD_NUMBER=$(date +%s)
84-
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_NUMBER" Poppool/Poppool/Resource/Info.plist
85-
8681
- name: ⬇️ Archive app # 빌드 및 아카이브
8782
run: |
8883
xcodebuild clean archive -project $XC_PROJECT -scheme $XC_SCHEME -configuration release -archivePath $XC_ARCHIVE

Poppool/Poppool.xcodeproj/project.pbxproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2992,6 +2992,7 @@
29922992
buildConfigurationList = BDCA41E72CF35AC2005EECF6 /* Build configuration list for PBXNativeTarget "Poppool" */;
29932993
buildPhases = (
29942994
05229DCF2D99507C00D88E73 /* Run SwiftLint */,
2995+
051E7D992DA6A23600F92DA8 /* Run Bump build version */,
29952996
BDCA41B92CF35AC0005EECF6 /* Sources */,
29962997
BDCA41BA2CF35AC0005EECF6 /* Frameworks */,
29972998
BDCA41BB2CF35AC0005EECF6 /* Resources */,
@@ -3100,6 +3101,24 @@
31003101
/* End PBXResourcesBuildPhase section */
31013102

31023103
/* Begin PBXShellScriptBuildPhase section */
3104+
051E7D992DA6A23600F92DA8 /* Run Bump build version */ = {
3105+
isa = PBXShellScriptBuildPhase;
3106+
buildActionMask = 2147483647;
3107+
files = (
3108+
);
3109+
inputFileListPaths = (
3110+
);
3111+
inputPaths = (
3112+
);
3113+
name = "Run Bump build version";
3114+
outputFileListPaths = (
3115+
);
3116+
outputPaths = (
3117+
);
3118+
runOnlyForDeploymentPostprocessing = 0;
3119+
shellPath = /bin/sh;
3120+
shellScript = "#!/bin/bash\n\nINFO_PLIST=\"$INFOPLIST_FILE\"\n\n# 기존 값 가져오기\nbuildDay=$(/usr/libexec/PlistBuddy -c \"Print buildDay\" \"$INFO_PLIST\" 2>/dev/null)\nbuildCount=$(/usr/libexec/PlistBuddy -c \"Print buildCount\" \"$INFO_PLIST\" 2>/dev/null)\ntoday=$(date +%Y%m%d)\n\n# 첫 실행 또는 키 없음\nif [ -z \"$buildDay\" ]; then\n buildDay=$today\n buildCount=1\nelse\n if [ \"$buildDay\" != \"$today\" ]; then\n buildDay=$today\n buildCount=1\n else\n buildCount=$((buildCount + 1))\n fi\nfi\n\nprintf -v zeroPadBuildCount \"%03d\" $buildCount\nbuildNumber=\"${buildDay}${zeroPadBuildCount}\"\n\n# Info.plist 업데이트\n/usr/libexec/PlistBuddy -c \"Delete buildDay\" \"$INFO_PLIST\" 2>/dev/null\n/usr/libexec/PlistBuddy -c \"Add buildDay string $buildDay\" \"$INFO_PLIST\"\n\n/usr/libexec/PlistBuddy -c \"Delete buildCount\" \"$INFO_PLIST\" 2>/dev/null\n/usr/libexec/PlistBuddy -c \"Add buildCount string $buildCount\" \"$INFO_PLIST\"\n\n/usr/libexec/PlistBuddy -c \"Delete CFBundleVersion\" \"$INFO_PLIST\" 2>/dev/null\n/usr/libexec/PlistBuddy -c \"Add CFBundleVersion string $buildNumber\" \"$INFO_PLIST\"\n\necho \"✅ CFBundleVersion set to $buildNumber\"\n";
3121+
};
31033122
05229DCF2D99507C00D88E73 /* Run SwiftLint */ = {
31043123
isa = PBXShellScriptBuildPhase;
31053124
alwaysOutOfDate = 1;

Poppool/Poppool/Resource/Info.plist

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>KAKAO_AUTH_APP_KEY</key>
6-
<string>${KAKAO_AUTH_APP_KEY}</string>
7-
<key>POPPOOL_BASE_URL</key>
8-
<string>${POPPOOL_BASE_URL}</string>
9-
<key>POPPOOL_S3_BASE_URL</key>
10-
<string>${POPPOOL_S3_BASE_URL}</string>
11-
<key>POPPOOL_API_KEY</key>
12-
<string>${POPPOOL_API_KEY}</string>
13-
<key>NAVER_MAP_CLIENT_ID</key>
14-
<string>${NAVER_MAP_CLIENT_ID}</string>
155
<key>CFBundleURLTypes</key>
166
<array>
177
<dict>
@@ -23,8 +13,12 @@
2313
</array>
2414
</dict>
2515
</array>
16+
<key>CFBundleVersion</key>
17+
<string>20250409004</string>
2618
<key>ITSAppUsesNonExemptEncryption</key>
2719
<false/>
20+
<key>KAKAO_AUTH_APP_KEY</key>
21+
<string>${KAKAO_AUTH_APP_KEY}</string>
2822
<key>LSApplicationQueriesSchemes</key>
2923
<array>
3024
<string>instagram</string>
@@ -35,6 +29,14 @@
3529
<string>kakaokompassauth</string>
3630
<string>kakaotalk</string>
3731
</array>
32+
<key>NAVER_MAP_CLIENT_ID</key>
33+
<string>${NAVER_MAP_CLIENT_ID}</string>
34+
<key>POPPOOL_API_KEY</key>
35+
<string>${POPPOOL_API_KEY}</string>
36+
<key>POPPOOL_BASE_URL</key>
37+
<string>${POPPOOL_BASE_URL}</string>
38+
<key>POPPOOL_S3_BASE_URL</key>
39+
<string>${POPPOOL_S3_BASE_URL}</string>
3840
<key>UIAppFonts</key>
3941
<array>
4042
<string>GothicA1-Bold.ttf</string>
@@ -63,5 +65,9 @@
6365
</array>
6466
</dict>
6567
</dict>
68+
<key>buildCount</key>
69+
<string>4</string>
70+
<key>buildDay</key>
71+
<string>20250409</string>
6672
</dict>
6773
</plist>

0 commit comments

Comments
 (0)