Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
MTE_1889 move app folders to focus (#3917)
Browse files Browse the repository at this point in the history
* Refactor MTE-1889 Move app files into folder

* move entitlement files

* added ci_scripts folder

* move all files into firefox-ios-app

* fixing content blocker script in checkout

* add new path to swiftlint temp

* comment xcodebuild without path to project

* change folders name to focus-ios and focus-ios-tests

* adding nimbus-fml script

* adding new path to release workflow
  • Loading branch information
isabelrios authored Nov 21, 2023
1 parent 4a34fee commit 04398d7
Show file tree
Hide file tree
Showing 1,513 changed files with 3,270 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@

# Changes to string files can be reviewed and approved by mergify

/Blockzilla/**/*.strings @mergify
focus-ios/Blockzilla/**/*.strings @mergify
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./focus-ios/github-actions-scripts/requirements.txt
pip install -r ./focus-ios/focus-ios-tests/github-actions-scripts/requirements.txt
- name: Modify SPM file
run: |
python ./focus-ios/github-actions-scripts/update-rust-component-version.py
python ./focus-ios/focus-ios-tests/github-actions-scripts/update-rust-component-version.py
- name: Get new rust-component tag to be used in the PR info
run: |
cd focus-ios/github-actions-scripts/
cd focus-ios/focus-ios-tests/github-actions-scripts/
chmod u+x read-rust-component-tag.sh
echo "version=$(./read-rust-component-tag.sh)" >> $GITHUB_ENV
- name: Remove temp file created to store the tag info
run: |
cd focus-ios/github-actions-scripts/
cd focus-ios/focus-ios-tests/github-actions-scripts/
[ ! -e newest_tag.txt ] || rm newest_tag.txt
- name: Script to check if branch exists to not commit again
run: |-
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/focus-ios-import-strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- name: Get the current date for PR title
run: echo "current_date=$(date +"%m-%d-%Y")" >> $GITHUB_ENV
- name: Run script to import strings
run: sh ./focus-ios/tools/import-strings.sh
run: sh ./focus-ios/focus-ios-tests/tools/import-strings.sh
- name: Update new strings
run: |-
git diff || (git add Blockzilla/*/*.lproj/* Blockzilla/*.lproj/* Blockzilla.xcodeproj/project.pbxproj)
git restore Blockzilla.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
git diff || (git add focus-ios/Blockzilla/*/*.lproj/* focus-ios/Blockzilla/*.lproj/* focus-ios/Blockzilla.xcodeproj/project.pbxproj)
git restore focus-ios/Blockzilla.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ focusios-l10n
export-locales-env

# localization tools clone
focus-ios/tools/Localizations
focus-ios/focus-ios-tests/tools/Localizations

# Glean
.venv/
Expand Down
13 changes: 7 additions & 6 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,15 @@ included: # paths to include during linting. `--path` is ignored if present.
excluded: # paths to ignore during linting. Takes precedence over `included`.
- Carthage
- Pods
- focus-ios/ClientTests/
- focus-ios/ScreenshotTests/
- Search/
- Client/Assets/Search/get_supported_locales.swift
- tools/
- focus-ios-tests/ClientTests/
- focus-ios-tests/ScreenshotTests/
- focus-ios/Search/
- focus-ios/Client/Assets/Search/get_supported_locales.swift
- focus-ios/focus-ios-tests/tools/
- rust-components-swift/
- Blockzilla/Generated/Metrics.swift
- focus-ios/Blockzilla/Generated/Metrics.swift
- l10n-screenshots-dd/
- DerivedData/
- focus-ios/

reporter: "xcode" # reporter type (xcode, json, csv, checkstyle)
70 changes: 36 additions & 34 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ workflows:
set -euxo pipefail
echo "-- build-for-testing --"
mkdir DerivedData
xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile
xcodebuild "-project" "/Users/vagrant/git/Blockzilla.xcodeproj" "-scheme" "Focus" -configuration "FocusDebug" "CODE_SIGNING_ALLOWED=NO" "-destination" "platform=iOS Simulator,name=iPhone 15,OS=17.0.1" "COMPILER_INDEX_STORE_ENABLE=NO" "build-for-testing" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" -derivedDataPath "/Users/vagrant/git/DerivedData" | xcpretty | tee xcodebuild_test.log
#xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile
xcodebuild "-project" "/Users/vagrant/git/focus-ios/Blockzilla.xcodeproj" "-scheme" "Focus" -configuration "FocusDebug" "CODE_SIGNING_ALLOWED=NO" "-destination" "platform=iOS Simulator,name=iPhone 15,OS=17.0.1" "COMPILER_INDEX_STORE_ENABLE=NO" "build-for-testing" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" -derivedDataPath "/Users/vagrant/git/DerivedData" | xcpretty | tee xcodebuild_test.log
- [email protected]:
title: Build for Testing Klar
inputs:
- content: |
set -euxo pipefail
echo "-- build-for-testing --"
xcodebuild "-project" "/Users/vagrant/git/Blockzilla.xcodeproj" "-scheme" "Klar" -configuration "KlarDebug" "CODE_SIGNING_ALLOWED=NO" "-destination" "platform=iOS Simulator,name=iPhone 15,OS=17.0.1" "COMPILER_INDEX_STORE_ENABLE=NO" "build-for-testing" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" -derivedDataPath "/Users/vagrant/git/DerivedData" | xcpretty | tee xcodebuild_test.log
xcodebuild "-project" "/Users/vagrant/git/focus-ios/Blockzilla.xcodeproj" "-scheme" "Klar" -configuration "KlarDebug" "CODE_SIGNING_ALLOWED=NO" "-destination" "platform=iOS Simulator,name=iPhone 15,OS=17.0.1" "COMPILER_INDEX_STORE_ENABLE=NO" "build-for-testing" "CODE_SIGN_IDENTITY=" "CODE_SIGNING_REQUIRED=NO" "CODE_SIGNING_ALLOWED=NO" -derivedDataPath "/Users/vagrant/git/DerivedData" | xcpretty | tee xcodebuild_test.log
- [email protected]:
title: Compress Derived Data
is_always_run: true
Expand All @@ -88,20 +88,20 @@ workflows:
set -euxo pipefail
echo "-- compress --"
exec zip -0 -qr "${BITRISE_SOURCE_DIR}/DerivedData.zip" \
"${BITRISE_SOURCE_DIR}/Blockzilla.xcodeproj" \
"${BITRISE_SOURCE_DIR}/focus-ios/Blockzilla.xcodeproj" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/FocusDebug-iphonesimulator/Firefox\ Focus.app" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/FocusDebug-iphonesimulator/XCUITest-Runner.app" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Focus_FullFunctionalTests_iphonesimulator17.0-arm64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Focus_SmokeTest_iphonesimulator17.0-arm64.xctestrun" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Focus_UnitTests_iphonesimulator17.0-arm64.xctestrun" \
"$BITRISE_SOURCE_DIR/focus-ios/SmokeTest.xctestplan" \
"$BITRISE_SOURCE_DIR/focus-ios/FullFunctionalTests.xctestplan" \
"$BITRISE_SOURCE_DIR/xcodebuild.log" \
"$BITRISE_SOURCE_DIR/focus-ios/focus-ios-tests/SmokeTest.xctestplan" \
"$BITRISE_SOURCE_DIR/focus-ios/focus-ios-tests/FullFunctionalTests.xctestplan" \
"$BITRISE_SOURCE_DIR/focus-ios/xcodebuild.log" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/FocusDebug-iphonesimulator/" \
"$BITRISE_SOURCE_DIR/focus-ios/UnitTests.xctestplan" \
"$BITRISE_SOURCE_DIR/Blockzilla/" \
"$BITRISE_SOURCE_DIR/focus-ios/XCUITest" \
"$BITRISE_SOURCE_DIR/focus-ios/ClientTests" \
"$BITRISE_SOURCE_DIR/focus-ios/focus-ios-tests/UnitTests.xctestplan" \
"$BITRISE_SOURCE_DIR/focus-ios/Blockzilla/" \
"$BITRISE_SOURCE_DIR/focus-ios/focus-ios-tests/XCUITest" \
"$BITRISE_SOURCE_DIR/focus-ios/focus-ios-tests/ClientTests" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/KlarDebug-iphonesimulator/Firefox\ Klar.app" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/KlarDebug-iphonesimulator/XCUITest-Runner.app" \
"$BITRISE_SOURCE_DIR/DerivedData/Build/Products/Klar_FullFunctionalTests_iphonesimulator17.0-arm64.xctestrun" \
Expand Down Expand Up @@ -165,9 +165,9 @@ workflows:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/focus-ios/XCUITest/
ls ./Users/vagrant/git/focus-ios/focus-ios-tests/XCUITest/
ls ./Users/vagrant/git/DerivedData/Build/Products
cp -r ./Users/vagrant/git/focus-ios/XCUITest/* .
cp -r ./Users/vagrant/git/focus-ios/focus-ios-tests/XCUITest/* .
mv ./Users/vagrant/git/* .
ls -la
echo "-- test-without-building --"
Expand Down Expand Up @@ -215,8 +215,8 @@ workflows:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/Blockzilla.xcodeproj/
cp -r ./Users/vagrant/git/Blockzilla.xcodeproj/* .
ls ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/
cp -r ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/* .
mv ./Users/vagrant/git/* .
ls -la
echo "-- test-without-building --"
Expand Down Expand Up @@ -260,8 +260,8 @@ workflows:
- content: |
#!/usr/bin/env bash
set -ex
ls ./Users/vagrant/git/Blockzilla.xcodeproj/
cp -r ./Users/vagrant/git/Blockzilla.xcodeproj/* .
ls ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/
cp -r ./Users/vagrant/git/focus-ios/Blockzilla.xcodeproj/* .
mv ./Users/vagrant/git/* .
ls -la
echo "-- test-without-building --"
Expand Down Expand Up @@ -307,22 +307,22 @@ workflows:
- set-xcode-build-number@1:
inputs:
- build_version_offset: '3250'
- plist_path: Blockzilla/Info.plist
- plist_path: focus-ios/Blockzilla/Info.plist
title: Set Blockzilla version numbers
- set-xcode-build-number@1:
inputs:
- build_version_offset: '3250'
- plist_path: ContentBlocker/Info.plist
- plist_path: focus-ios/ContentBlocker/Info.plist
title: Set ContentBlocker version numbers
- set-xcode-build-number@1:
inputs:
- build_version_offset: '3250'
- plist_path: FocusIntentExtension/Info.plist
- plist_path: focus-ios/FocusIntentExtension/Info.plist
title: Set FocusIntentExtension version numbers
- set-xcode-build-number@1:
inputs:
- build_version_offset: '3250'
- plist_path: OpenInFocus/Info.plist
- plist_path: focus-ios/OpenInFocus/Info.plist
title: Set OpenInFocus version numbers
meta:
bitrise.io:
Expand All @@ -337,10 +337,10 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -x
/usr/libexec/PlistBuddy -c "Add :NimbusServerURL string ${NIMBUS_SERVER_URL}" Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Add :NimbusStagingServerURL string ${NIMBUS_STAGING_SERVER_URL}" Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Set :NimbusAppName ${NIMBUS_APP_NAME}" Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Set :NimbusAppChannel ${NIMBUS_APP_CHANNEL}" Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Add :NimbusServerURL string ${NIMBUS_SERVER_URL}" focus-ios/Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Add :NimbusStagingServerURL string ${NIMBUS_STAGING_SERVER_URL}" focus-ios/Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Set :NimbusAppName ${NIMBUS_APP_NAME}" focus-ios/Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Set :NimbusAppChannel ${NIMBUS_APP_CHANNEL}" focus-ios/Blockzilla/Info.plist
meta:
bitrise.io:
stack: osx-xcode-15.0.x
Expand All @@ -354,7 +354,7 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -x
/usr/libexec/PlistBuddy -c "Add :SentryDSN string ${SENTRY_DSN}" Blockzilla/Info.plist
/usr/libexec/PlistBuddy -c "Add :SentryDSN string ${SENTRY_DSN}" focus-ios/Blockzilla/Info.plist
meta:
bitrise.io:
stack: osx-xcode-15.0.x
Expand All @@ -368,8 +368,8 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -x
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Focus.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Klar.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Focus.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Klar.entitlements
meta:
bitrise.io:
stack: osx-xcode-15.0.x
Expand All @@ -380,6 +380,7 @@ workflows:
- certificate-and-profile-installer@1: {}
- xcode-archive@3:
inputs:
- project_path: focus-ios/Blockzilla.xcodeproj
- scheme: Focus
- team_id: 43AQ936H96
- export_method: app-store
Expand All @@ -399,6 +400,7 @@ workflows:
--org mozilla --project focus-ios "$BITRISE_DSYM_DIR_PATH"
- xcode-archive@3:
inputs:
- project_path: focus-ios/Blockzilla.xcodeproj
- scheme: Klar
- export_method: app-store
title: Build Klar
Expand Down Expand Up @@ -439,8 +441,8 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -x
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Focus.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Klar.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Focus.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Klar.entitlements
- script@1:
inputs:
- content: >-
Expand Down Expand Up @@ -475,7 +477,7 @@ workflows:
set -x
# workaround until 2.187 version is installed. Error with 2.186
./focus-ios/l10n-screenshots.sh --test-without-building $MOZ_LOCALES
./focus-ios/focus-ios-tests/l10n-screenshots.sh --test-without-building $MOZ_LOCALES
mkdir -p artifacts
for locale in $(echo $MOZ_LOCALES); do
Expand Down Expand Up @@ -509,8 +511,8 @@ workflows:
- content: |-
#!/usr/bin/env bash
set -x
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Focus.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" Klar.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Focus.entitlements
/usr/libexec/PlistBuddy -c "Add :com.apple.developer.web-browser bool true" focus-ios/Klar.entitlements
- script@1:
title: Generate screenshots
inputs:
Expand All @@ -519,7 +521,7 @@ workflows:
set -x
# workaround until 2.187 version is installed. Error with 2.186
./focus-ios/l10n-screenshots.sh en-US
./focus-ios/focus-ios-tests/l10n-screenshots.sh en-US
- [email protected]:
inputs:
- deploy_path: l10n-screenshots-dd/
Expand Down
1 change: 1 addition & 0 deletions checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set -x
NIMBUS_FML_FILE=./nimbus.fml.yaml
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/mozilla/application-services/main/components/nimbus/ios/scripts/bootstrap.sh | bash -s -- $NIMBUS_FML_FILE

cd focus-ios
git clone https://github.com/mozilla-services/shavar-prod-lists.git || exit 1

# Grab the las known (pinned) commit on the 93.0 branch
Expand Down
Loading

0 comments on commit 04398d7

Please sign in to comment.