From 7d4612996b4c5b0a6a9f1a6c38974e871468c1c7 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 Jan 2020 22:49:16 +0000 Subject: [PATCH 1/4] Rename iOS module name of sample app from gutenberg to GutenbergDemo. This is to avoid conflicts with the pod Gutenberg. --- ios/gutenberg.xcodeproj/project.pbxproj | 10 +++---- .../xcshareddata/xcschemes/gutenberg.xcscheme | 28 ++++++++----------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/ios/gutenberg.xcodeproj/project.pbxproj b/ios/gutenberg.xcodeproj/project.pbxproj index 632223ebbffd33..986f053397a9fd 100644 --- a/ios/gutenberg.xcodeproj/project.pbxproj +++ b/ios/gutenberg.xcodeproj/project.pbxproj @@ -56,7 +56,7 @@ 034874811302E030BA1637A1 /* Pods-gutenbergTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-gutenbergTests.debug.xcconfig"; path = "Target Support Files/Pods-gutenbergTests/Pods-gutenbergTests.debug.xcconfig"; sourceTree = ""; }; 083D3CAD9B26701AE0659EEB /* Pods-gutenberg.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-gutenberg.release.xcconfig"; path = "Target Support Files/Pods-gutenberg/Pods-gutenberg.release.xcconfig"; sourceTree = ""; }; 0EB766FE2F6D446A80AC6E6A /* libRNSVG.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSVG.a; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* gutenberg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = gutenberg.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07F961A680F5B00A75B9A /* GutenbergDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GutenbergDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = gutenberg/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = gutenberg/Info.plist; sourceTree = ""; }; @@ -215,7 +215,7 @@ 83CBBA001A601CBA00E9B192 /* Products */ = { isa = PBXGroup; children = ( - 13B07F961A680F5B00A75B9A /* gutenberg.app */, + 13B07F961A680F5B00A75B9A /* GutenbergDemo.app */, 00E356EE1AD99517003FC87E /* gutenbergTests.xctest */, 2D02E47B1E0B4A5D006451C7 /* gutenberg-tvOS.app */, 2D02E4901E0B4A5D006451C7 /* gutenberg-tvOSTests.xctest */, @@ -309,7 +309,7 @@ ); name = gutenberg; productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* gutenberg.app */; + productReference = 13B07F961A680F5B00A75B9A /* GutenbergDemo.app */; productType = "com.apple.product-type.application"; }; 2D02E47A1E0B4A5D006451C7 /* gutenberg-tvOS */ = { @@ -797,7 +797,7 @@ "-ObjC", "-lc++", ); - PRODUCT_NAME = gutenberg; + PRODUCT_NAME = GutenbergDemo; SWIFT_OBJC_BRIDGING_HEADER = "gutenberg-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -827,7 +827,7 @@ "-ObjC", "-lc++", ); - PRODUCT_NAME = gutenberg; + PRODUCT_NAME = GutenbergDemo; SWIFT_OBJC_BRIDGING_HEADER = "gutenberg-Bridging-Header.h"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/ios/gutenberg.xcodeproj/xcshareddata/xcschemes/gutenberg.xcscheme b/ios/gutenberg.xcodeproj/xcshareddata/xcschemes/gutenberg.xcscheme index 9f2d80e4dc0e9e..8c6a40ffb9c923 100644 --- a/ios/gutenberg.xcodeproj/xcshareddata/xcschemes/gutenberg.xcscheme +++ b/ios/gutenberg.xcodeproj/xcshareddata/xcschemes/gutenberg.xcscheme @@ -29,7 +29,7 @@ @@ -55,6 +55,15 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + @@ -67,17 +76,6 @@ - - - - - - - - From 2967f06b64e89c368f6f8e2f4ec0475873143e12 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 Jan 2020 23:10:41 +0000 Subject: [PATCH 2/4] Change folder references do gutenberg.app to GutenbergDemo.app --- __device-tests__/helpers/utils.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__device-tests__/helpers/utils.js b/__device-tests__/helpers/utils.js index ce78c87d63b7d6..2cc4857989e5bd 100644 --- a/__device-tests__/helpers/utils.js +++ b/__device-tests__/helpers/utils.js @@ -29,7 +29,7 @@ const testEnvironment = process.env.TEST_ENV || defaultEnvironment; // Local App Paths const defaultAndroidAppPath = './android/app/build/outputs/apk/debug/app-debug.apk'; -const defaultIOSAppPath = './ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app'; +const defaultIOSAppPath = './ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo'; const localAndroidAppPath = process.env.ANDROID_APP_PATH || defaultAndroidAppPath; const localIOSAppPath = process.env.IOS_APP_PATH || defaultIOSAppPath; diff --git a/package.json b/package.json index b49f8aad589178..3f2427c4b6faec 100644 --- a/package.json +++ b/package.json @@ -113,8 +113,8 @@ "test:e2e:bundle:android": "mkdir -p android/app/src/main/assets && react-native bundle --reset-cache --platform android --dev false --minify false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res", "test:e2e:build-app:android": "yarn test:e2e:bundle:android && cd android && ./gradlew clean && ./gradlew assembleDebug", "test:e2e:install-app:android": "cd android && ./gradlew installDebug", - "test:e2e:bundle:ios": "react-native bundle --reset-cache --platform=ios --dev=false --minify false --entry-file=index.js --bundle-output=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app/main.jsbundle --assets-dest=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app", - "test:e2e:build-app:ios": "react-native run-ios --configuration Release --no-packager --simulator=\"iPhone 11\" && yarn test:e2e:bundle:ios && WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/Gutenberg.app.zip gutenberg.app", + "test:e2e:bundle:ios": "react-native bundle --reset-cache --platform=ios --dev=false --minify false --entry-file=index.js --bundle-output=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo/main.jsbundle --assets-dest=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo", + "test:e2e:build-app:ios": "react-native run-ios --configuration Release --no-packager --simulator=\"iPhone 11\" && yarn test:e2e:bundle:ios && WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/GutenbergDemo.zip GutenbergDemo", "test:e2e:install-app:ios": "yarn test:e2e:build-app:ios", "flow": "flow", "prettier": "prettier-eslint --write $npm_package_config_jsfiles $npm_package_config_scssfiles", From 496135df0c11c7c31f0c6f52f37da2205054f1d3 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Fri, 24 Jan 2020 23:20:42 +0000 Subject: [PATCH 3/4] Fix demo app name --- __device-tests__/helpers/utils.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__device-tests__/helpers/utils.js b/__device-tests__/helpers/utils.js index 2cc4857989e5bd..cea8068568f9a6 100644 --- a/__device-tests__/helpers/utils.js +++ b/__device-tests__/helpers/utils.js @@ -29,7 +29,7 @@ const testEnvironment = process.env.TEST_ENV || defaultEnvironment; // Local App Paths const defaultAndroidAppPath = './android/app/build/outputs/apk/debug/app-debug.apk'; -const defaultIOSAppPath = './ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo'; +const defaultIOSAppPath = './ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app'; const localAndroidAppPath = process.env.ANDROID_APP_PATH || defaultAndroidAppPath; const localIOSAppPath = process.env.IOS_APP_PATH || defaultIOSAppPath; diff --git a/package.json b/package.json index 3f2427c4b6faec..aff48105d69976 100644 --- a/package.json +++ b/package.json @@ -113,8 +113,8 @@ "test:e2e:bundle:android": "mkdir -p android/app/src/main/assets && react-native bundle --reset-cache --platform android --dev false --minify false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res", "test:e2e:build-app:android": "yarn test:e2e:bundle:android && cd android && ./gradlew clean && ./gradlew assembleDebug", "test:e2e:install-app:android": "cd android && ./gradlew installDebug", - "test:e2e:bundle:ios": "react-native bundle --reset-cache --platform=ios --dev=false --minify false --entry-file=index.js --bundle-output=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo/main.jsbundle --assets-dest=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo", - "test:e2e:build-app:ios": "react-native run-ios --configuration Release --no-packager --simulator=\"iPhone 11\" && yarn test:e2e:bundle:ios && WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/GutenbergDemo.zip GutenbergDemo", + "test:e2e:bundle:ios": "react-native bundle --reset-cache --platform=ios --dev=false --minify false --entry-file=index.js --bundle-output=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle --assets-dest=./ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app", + "test:e2e:build-app:ios": "react-native run-ios --configuration Release --no-packager --simulator=\"iPhone 11\" && yarn test:e2e:bundle:ios && WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/GutenbergDemo.app.zip GutenbergDemo.app", "test:e2e:install-app:ios": "yarn test:e2e:build-app:ios", "flow": "flow", "prettier": "prettier-eslint --write $npm_package_config_jsfiles $npm_package_config_scssfiles", From c56d44e01d5b51174cb49194152b975cf1e1bb78 Mon Sep 17 00:00:00 2001 From: Sergio Estevao Date: Sat, 25 Jan 2020 00:04:12 +0000 Subject: [PATCH 4/4] Update circleci configuration. --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a908be903c4871..a0137bf92417f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -119,7 +119,7 @@ jobs: - dependencies-v3- - run: name: Yarn preios (if needed) - command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || yarn preios + command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || yarn preios - save_cache: name: Save Dependencies Cache key: dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}-{{ @@ -131,18 +131,18 @@ jobs: - ios/vendor - run: name: Build (if needed) - command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || yarn react-native run-ios --configuration Release --no-packager + command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || yarn react-native run-ios --configuration Release --no-packager - run: name: Bundle iOS command: yarn test:e2e:bundle:ios - run: name: Generate .app file for testing - command: WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/Gutenberg.app.zip gutenberg.app + command: WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/GutenbergDemo.app.zip GutenbergDemo.app - run: name: Upload .app to sauce labs command: | source bin/sauce-pre-upload.sh - curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./ios/Gutenberg.app.zip + curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./ios/GutenbergDemo.app.zip - run: name: Run Device Tests command: | @@ -153,12 +153,12 @@ jobs: path: ./reports/test-results - run: name: Prepare build cache - command: rm ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app/main.jsbundle + command: rm ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle - save_cache: name: Save Build Cache key: ios-build-cache-{{ checksum "ios-checksums.txt" }} paths: - - ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app + - ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app workflows: gutenberg-mobile: