Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FXIOS-5163 [v108] Add support for local rust-components-swift workflow #12247

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions bin/nimbus-fml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,17 @@ fi
number_string=$(grep -A 3 $'https://github.com/mozilla/rust-components-swift' "$SOURCE_ROOT/$PROJECT.xcodeproj/project.pbxproj" | grep -E -o "\d+\.\d+\.\d+")

if [ -z "$number_string" ]; then
echo "Error: No https://github.com/mozilla/rust-components-swift package was detected."
echo "The package must be added as a project dependency."
exit 2
# If there is no rust-components then perhaps we're building with a local versions of rust_components, using rust_components_local.sh .
# We try to resolve that, and find the version from the Package.swift file in that local directory.
# https://github.com/mozilla-mobile/firefox-ios/issues/12243
rust_components_path=$(grep -A 3 $'XCRemoteSwiftPackageReference "rust-components-swift"' "$SOURCE_ROOT/$PROJECT.xcodeproj/project.pbxproj" | grep 'repositoryURL = "file://' | grep -o -E '/\w[^"]+')
number_string=$(grep 'let version =' "$rust_components_path/Package.swift" | grep -E -o "\d+\.\d+\.\d+")

if [ -z "$number_string" ]; then
echo "Error: No https://github.com/mozilla/rust-components-swift package was detected."
echo "The package must be added as a project dependency."
exit 2
fi
fi

AS_VERSION="v$number_string"
Expand Down Expand Up @@ -218,7 +226,7 @@ done
# Now generate the YAML that the `experimenter` server will use to keep up to date.
# This file, `.experimenter.yaml` **must** be checked into source control, and kept up-to-date.
# Experimenter will download it regularly/nightly.
CMD="$BINARY_PATH generate-experimenter --channel $CHANNEL --cache-dir $CACHE_DIR $APP_FML_FILE $EXPERIMENTER_MANIFEST"
CMD="$BINARY_PATH generate-experimenter $repo_args --channel $CHANNEL --cache-dir $CACHE_DIR $APP_FML_FILE $EXPERIMENTER_MANIFEST"
display=${CMD//"$SOURCE_ROOT"/\$SOURCE_ROOT}
echo "$display"
$CMD
Expand Down