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

No Bug: Add support for building with enterprise account #2732

Merged
merged 8 commits into from
Jul 23, 2020

Conversation

kylehickinson
Copy link
Collaborator

Summary of Changes

Environment variables must be placed in .env.default in root directory. PR can be squashed

Submitter Checklist:

  • Unit Tests are updated to cover new or changed functionality
  • User-facing strings use NSLocalizableString()

Reviewer Checklist:

  • Issues include necessary QA labels:
    • QA/(Yes|No)
    • release-notes/(include|exclude)
    • bug / enhancement
  • Necessary security reviews have taken place.
  • Adequate unit test coverage exists to prevent regressions.
  • Adequate test plan exists for QA to validate (if applicable).
  • Issue is assigned to a milestone (should happen at merge time).

Renames build channels:
- `developer` -> `debug`
- `enterprise` -> `dev`

Then creates `enterprise` again for enterprise builds

Renames preprocessor macros:
- `MOZ_CHANNEL_FENNEC` -> `MOZ_CHANNEL_DEBUG`
- `MOZ_CHANNEL_ENTERPRISE` -> `MOZ_CHANNEL_DEV`

Then creates `MOZ_CHANNEL_ENTERPRISE` again for enterprise builds
Copy link
Contributor

@iccub iccub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good left few questions

@@ -104,7 +134,7 @@ platform :ios do
sdk: "iphoneos",
clean: true,
skip_package_ipa: true,
xcargs: "-allowProvisioningUpdates BRAVE_API_KEY=\"#{sh("head", "-1", "#{ENV['HOME']}/.brave-api-key")}\""
xcargs: "-allowProvisioningUpdates BRAVE_API_KEY=\"#{ENV['BRAVE_STATS_API_KEY']}\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this affect our manual builds now? Since we have to read the api key from disk

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, API key will now go in .env.default file in brave-ios which won't be committed. That file matches

KEY = VALUE
KEY2 = VALUE2

syntax.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@@ -5569,13 +5573,16 @@
271DEC18234CC75F009DAC37 = {
CreatedOnToolsVersion = 11.1;
LastSwiftMigration = 1110;
ProvisioningStyle = Automatic;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this? added to many places, looks like CODE_SIGN_STYLE replacement

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure I can control this one since its not part of the build settings. I believe Xcode added this once code sign style differed between different build configs

Client.xcodeproj/project.pbxproj Show resolved Hide resolved
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_Dev;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should ask James for new icon for enterprise builds

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @jamesmudgett If you want to give us a new icon for Enterprise builds? Otherwise it will use Brave Dev icons

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also use:

add_badge(
      no_badge: true, 
      shield: "#{ENV["CONFIGURATION"]}-#{ENV["VERSION_NAME"]}[#{ENV["BUILD_NUMBER"]}]-blue", 
      shield_no_resize: true
    )

And it'll automatically add like a blue stripe with version and build type to the icon.

@kylehickinson kylehickinson mentioned this pull request Jul 22, 2020
7 tasks
Client.xcodeproj/project.pbxproj Show resolved Hide resolved
Client.xcodeproj/project.pbxproj Show resolved Hide resolved
Client.xcodeproj/project.pbxproj Show resolved Hide resolved
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon_Dev;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also use:

add_badge(
      no_badge: true, 
      shield: "#{ENV["CONFIGURATION"]}-#{ENV["VERSION_NAME"]}[#{ENV["BUILD_NUMBER"]}]-blue", 
      shield_no_resize: true
    )

And it'll automatically add like a blue stripe with version and build type to the icon.

@iccub
Copy link
Contributor

iccub commented Jul 22, 2020

@Brandon-T we don't use badges. We harcode them within the app_icon

@kylehickinson kylehickinson merged commit eecd60e into development Jul 23, 2020
@kylehickinson kylehickinson deleted the enterprise-build branch July 23, 2020 18:23
@iccub iccub mentioned this pull request Jul 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants