Skip to content

Commit cafdc5e

Browse files
authored
Configuration of Dev distribution has been done #46 (#47)
1 parent 89bd863 commit cafdc5e

File tree

5 files changed

+91
-7
lines changed

5 files changed

+91
-7
lines changed

ci_scripts/ci_post_clone.sh

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,42 @@ curl https://mise.jdx.dev/install.sh | sh
1010

1111
/Users/local/.local/bin/mise install # Installs the version from .mise.toml
1212

13-
if [[ -n $CI_PULL_REQUEST_NUMBER ]];
13+
14+
if [ $CI_WORKFLOW_ID -eq 'DF8E0AB2-31E7-450B-B956-B1F0D3EC3CAF' ];
1415
then
16+
17+
# Dev release workflow
18+
19+
sh ./make_files/dev/make_endpoint.sh
20+
sh ./make_files/dev/make_firebase.sh
1521

1622
cd ..
1723

18-
/Users/local/.local/bin/mise exec -- tuist generate UseCasesTests ViewModelsTests --no-open
24+
TUIST_DEVELOPMENT_TEAM=$DEVELOPMENT_TEAM /Users/local/.local/bin/mise exec -- tuist generate SurchargesDev --no-open
1925

2026
else
27+
28+
# Prod release, Prod tests workflow
29+
30+
if [[ -n $CI_PULL_REQUEST_NUMBER ]];
31+
then
32+
33+
# Prod tests workflow
34+
35+
cd ..
2136

22-
echo $CI_TAG
37+
/Users/local/.local/bin/mise exec -- tuist generate UseCasesTests ViewModelsTests --no-open
2338

24-
sh ./make_files/make_endpoint.sh
25-
sh ./make_files/make_firebase.sh
39+
else
2640

27-
cd ..
41+
# Prod release workflow
42+
43+
sh ./make_files/prod/make_endpoint.sh
44+
sh ./make_files/prod/make_firebase.sh
45+
46+
cd ..
2847

29-
TUIST_APP_VERSION=$CI_TAG TUIST_DEVELOPMENT_TEAM=$DEVELOPMENT_TEAM /Users/local/.local/bin/mise exec -- tuist generate --no-open
48+
TUIST_APP_VERSION=$CI_TAG TUIST_DEVELOPMENT_TEAM=$DEVELOPMENT_TEAM /Users/local/.local/bin/mise exec -- tuist generate Surcharges --no-open
3049

50+
fi
3151
fi
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
3+
# make_endpoint.sh
4+
#
5+
#
6+
# Created by Bonsung Koo on 28/01/2025.
7+
#
8+
9+
echo "import Foundation" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
10+
echo "import EndpointProtocol" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
11+
echo "public struct DevelopmentEndpoint: EndpointProtocol {" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
12+
echo "public init() { }" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
13+
echo "public var baseURL: String {" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
14+
echo "return \"$BASE_URL\"" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
15+
echo "}" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
16+
echo "public var authorisationScheme: String {" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
17+
echo "return \"$AUTHORISATION_SCHEME\"" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
18+
echo "}" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
19+
echo "public var authorisationToken: String {" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
20+
echo "return \"$AUTHORISATION_TOKEN\"" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
21+
echo "}" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
22+
echo "}" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/DataSource/Endpoints/DevelopmentEndpoint/Sources/DevelopmentEndpoint.swift
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
3+
# make_firebase.sh
4+
#
5+
#
6+
# Created by Bonsung Koo on 28/01/2025.
7+
#
8+
9+
echo "<?xml version="1.0" encoding="UTF-8"?>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
10+
echo "<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
11+
echo "<plist version="1.0">" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
12+
echo "<dict>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
13+
echo "<key>CLIENT_ID</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
14+
echo "<string>$FIREBASE_CLIENT_ID</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
15+
echo "<key>REVERSED_CLIENT_ID</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
16+
echo "<string>$FIREBASE_REVERSED_CLIENT_ID</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
17+
echo "<key>API_KEY</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
18+
echo "<string>$FIREBASE_API_KEY</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
19+
echo "<key>GCM_SENDER_ID</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
20+
echo "<string>$FIREBASE_GCM_SENDER_ID</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
21+
echo "<key>PLIST_VERSION</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
22+
echo "<string>1</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
23+
echo "<key>BUNDLE_ID</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
24+
echo "<string>nz.surcharges.development</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
25+
echo "<key>PROJECT_ID</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
26+
echo "<string>surcharges-dev</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
27+
echo "<key>STORAGE_BUCKET</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
28+
echo "<string>$FIREBASE_STORAGE_BUCKET</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
29+
echo "<key>IS_ADS_ENABLED</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
30+
echo "<false></false>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
31+
echo "<key>IS_ANALYTICS_ENABLED</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
32+
echo "<false></false>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
33+
echo "<key>IS_APPINVITE_ENABLED</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
34+
echo "<true></true>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
35+
echo "<key>IS_GCM_ENABLED</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
36+
echo "<true></true>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
37+
echo "<key>IS_SIGNIN_ENABLED</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
38+
echo "<true></true>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
39+
echo "<key>GOOGLE_APP_ID</key>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
40+
echo "<string>$FIREBASE_GOOGLE_APP_ID</string>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
41+
echo "</dict>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
42+
echo "</plist>" >> $CI_PRIMARY_REPOSITORY_PATH/Surcharges/Applications/Resources/Dev/GoogleService-Info.plist
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)