Skip to content

Commit

Permalink
📦 Debug Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Nonchalant committed May 13, 2019
1 parent 3c98e3e commit 7d2f1ce
Show file tree
Hide file tree
Showing 11 changed files with 525 additions and 393 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

### Swift ###
## Xcode
StreetFighterV/Resources/GoogleService-Info.plist
StreetFighterV/Resources/GoogleService/GoogleService-Info.Debug.plist
StreetFighterV/Resources/GoogleService/GoogleService-Info.plist
StreetFighterV/Resources/GoogleService/GoogleService-Info.Release.plist
StreetFighterV/Resources/Info.plist
scripts/fabric.sh

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
Download `fastlane/.env` from [here](https://github.com/Nonchalant/env/blob/master/StreetFighterV/fastlane/.env) (**You need permission**)

```
$ brew install xcodegen
$ bundle install
$ bundle exec pod install
$ bundle exec fastlane setup
```

Expand Down
698 changes: 344 additions & 354 deletions StreetFighterV.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "60171AE621B2381A001FD251"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
Expand All @@ -32,7 +32,7 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "60171AE621B2381A001FD251"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
Expand All @@ -45,7 +45,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = "en"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -56,18 +55,12 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "60171AE621B2381A001FD251"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-FIRAnalyticsDebugEnabled"
isEnabled = "NO">
</CommandLineArgument>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand All @@ -81,7 +74,7 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "60171AE621B2381A001FD251"
BlueprintIdentifier = "16718404124DC5DB2A6335F3836E20CC"
BuildableName = "StreetFighterV.app"
BlueprintName = "StreetFighterV"
ReferencedContainer = "container:StreetFighterV.xcodeproj">
Expand Down
13 changes: 13 additions & 0 deletions StreetFighterV/Resources/Config/Config.Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include "Pods/Target Support Files/Pods-StreetFighterV/Pods-StreetFighterV.debug.xcconfig"
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CODE_SIGN_STYLE = Automatic
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
DEVELOPMENT_TEAM = HKDHURHY83
INFOPLIST_FILE = $(SRCROOT)/StreetFighterV/Resources/Info.plist
IPHONEOS_DEPLOYMENT_TARGET = 11.4
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks'
OTHER_SWIFT_FLAGS = "-D" "DEBUG"
PRODUCT_BUNDLE_IDENTIFIER = com.nonchalant.StreetFighterV
//PRODUCT_NAME = $(TARGET_NAME)
SWIFT_VERSION = 5.0
TARGETED_DEVICE_FAMILY = 1,2
11 changes: 11 additions & 0 deletions StreetFighterV/Resources/Config/Config.Release.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include "Pods/Target Support Files/Pods-StreetFighterV/Pods-StreetFighterV.release.xcconfig"
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CODE_SIGN_STYLE = Automatic
DEVELOPMENT_TEAM = HKDHURHY83
INFOPLIST_FILE = $(SRCROOT)/StreetFighterV/Resources/Info.plist
IPHONEOS_DEPLOYMENT_TARGET = 11.4
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks'
PRODUCT_BUNDLE_IDENTIFIER = com.nonchalant.StreetFighterV
PRODUCT_NAME = $(TARGET_NAME)
SWIFT_VERSION = 5.0
TARGETED_DEVICE_FAMILY = 1,2
45 changes: 25 additions & 20 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,34 @@ lane :setup do
output_file_name: "./StreetFighterV/Resources/Info.plist"
)

sh "cp ./GoogleService-Info.plist ../StreetFighterV/Resources/GoogleService-Info.plist"
["Debug", "Release"].each do |configuration|
sh "cp ./GoogleService-Info.plist ../StreetFighterV/Resources/GoogleService/GoogleService-Info.#{configuration}.plist"

[
"AD_UNIT_ID_FOR_BANNER_TEST",
"AD_UNIT_ID_FOR_INTERSTITIAL_TEST",
"CLIENT_ID",
"REVERSED_CLIENT_ID",
"API_KEY",
"GCM_SENDER_ID",
"PROJECT_ID",
"STORAGE_BUCKET",
"GOOGLE_APP_ID",
"DATABASE_URL"
].each { |key|
set_info_plist_value(
path: "./StreetFighterV/Resources/GoogleService-Info.plist",
key: key,
value: ENV[key],
output_file_name: "./StreetFighterV/Resources/GoogleService-Info.plist"
)
}
[
"AD_UNIT_ID_FOR_BANNER_TEST",
"AD_UNIT_ID_FOR_INTERSTITIAL_TEST",
"CLIENT_ID",
"REVERSED_CLIENT_ID",
"API_KEY",
"GCM_SENDER_ID",
"PROJECT_ID",
"STORAGE_BUCKET",
"GOOGLE_APP_ID",
"DATABASE_URL"
].each { |key|
set_info_plist_value(
path: "./StreetFighterV/Resources/GoogleService/GoogleService-Info.#{configuration}.plist",
key: key,
value: ENV["#{configuration.upcase}_#{key}"],
output_file_name: "./StreetFighterV/Resources/GoogleService/GoogleService-Info.#{configuration}.plist"
)
}
end

sh "cp ./fabric.sh ../scripts/fabric.sh"
sh "sed -i.bak -e 's/FABRIC_API_KEY/#{ENV["FABRIC_API_KEY"]}/g' ../scripts/fabric.sh"
sh "sed -i.bak -e 's/FABRIC_BUILD_SECRET/#{ENV["FABRIC_BUILD_SECRET"]}/g' ../scripts/fabric.sh"

sh "xcodegen generate --spec ../project.yml"
cocoapods(verbose: true)
end
26 changes: 26 additions & 0 deletions project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: StreetFighterV
targets:
StreetFighterV:
type: application
platform: iOS
sources: StreetFighterV
configFiles:
Debug: StreetFighterV/Resources/Config/Config.Debug.xcconfig
Release: StreetFighterV/Resources/Config/Config.Release.xcconfig
preBuildScripts:
- name: SwiftGen Run Script
script: |
$PODS_ROOT/SwiftGen/bin/swiftgen
- name: GoogleService-Info.plist
script: |
if [ "${CONFIGURATION}" = "Debug" ]; then
cp "${SRCROOT}/StreetFighterV/Resources/GoogleService/GoogleService-Info.Debug.plist" "${SRCROOT}/StreetFighterV/Resources/GoogleService/GoogleService-Info.plist"
echo "Debug GoogleService-Info.plist"
else
cp "${SRCROOT}/StreetFighterV/Resources/GoogleService/GoogleService-Info.Release.plist" "${SRCROOT}/StreetFighterV/Resources/GoogleService/GoogleService-Info.plist"
echo "Release GoogleService-Info.plist"
fi
postBuildScripts:
- name: Fabric Run Script
script: |
./scripts/fabric.sh
11 changes: 6 additions & 5 deletions scripts/upload.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function upload() {
["1i-YEhLRZo8mjB-A1WwQO7nMjwlFPLM6hzIIdqzPGrTI", "1n2WQmwa-jsH4NB_GPp97z34IDZpkeUW8LKm8JQSrAp8"].forEach(function(sheetId) {
function upload_environment() {
// REPLACE ME
[ENV["SPREADSHEET_EN_JA"], ENV["SPREADSHEET_EN_EN"]].forEach(function(sheetId) {
var spreadSheet = SpreadsheetApp.openById(sheetId);
var characters = getCharacters_(spreadSheet);
var locale = getLocale_(spreadSheet);
Expand Down Expand Up @@ -103,9 +104,9 @@ function getTypeName_(type) {

function uploadJson_(document, locale, json) {
// REPLACE ME
var email = ENV["FIREBASE_EMAIL"];
var key = ENV["FIREBASE_KEY"];
var projectId = ENV["FIREBASE_PROJECT_ID"];
var email = ENV["ENVIRONMENT_FIREBASE_EMAIL"];
var key = ENV["ENVIRONMENT_FIREBASE_KEY"];
var projectId = ENV["ENVIRONMENT_FIREBASE_PROJECT_ID"];

var firestore = FirestoreApp.getFirestore(email, key, projectId);
firestore.updateDocument("Characters/" + locale + "/" + document, json);
Expand Down

0 comments on commit 7d2f1ce

Please sign in to comment.