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

Automate Cocoapods lib lint #2153

Merged
merged 4 commits into from May 15, 2024
Merged

Conversation

diegojerezba
Copy link
Contributor

@diegojerezba diegojerezba commented May 8, 2024

Proposed changes

Run pod lib lint in the PR validation script.

Explanation of the script:

  1. The task "Replace HEADER_SEARCH_PATHS for NativeAuth subspec in MSAL.podspec", searches for "$SRCROOT/MSAL" in the podspec and replaces it with __dir__. This is done according to the wiki.
  2. Then it runs the command pod lib lint.
  3. After that, the changes made to the MSAL.podspec file are discarded. I'm not sure if this step is necessary in Azure Pipelines, but I thought it was better to have it.

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High – Errors could cause MAJOR regression of many scenarios. (Example: new large features or high level infrastructure changes)
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small – No issues are expected. (Example: Very small bug fixes, string changes, or configuration settings changes)

@diegojerezba diegojerezba force-pushed the diegoje/automate-cocoapods-lib-lint branch 2 times, most recently from b9a13af to bc32bb7 Compare May 9, 2024 17:11
@diegojerezba diegojerezba marked this pull request as ready for review May 9, 2024 17:21
@diegojerezba diegojerezba requested a review from a team as a code owner May 9, 2024 17:21
@diegojerezba diegojerezba requested review from jasoncoolmax, Veena11, ameyapat, nilo-ms, spetrescu84 and borgesmb and removed request for Veena11 May 9, 2024 17:21
Copy link
Contributor

@nilo-ms nilo-ms left a comment

Choose a reason for hiding this comment

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

LGTM

inputs:
targetType: 'inline'
script: |
git checkout -- MSAL.podspec
Copy link
Contributor

@nilo-ms nilo-ms May 10, 2024

Choose a reason for hiding this comment

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

nit: do we need to specify "-f" to force in any case the substitution of the file?

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, you can create a new folder and checkout in there, run lint and then delete folder when done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you both. I have added the -f 👍


steps:

- checkout: self
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you checking out the repository in the pipeline again? Don't we already do checkout at line 40?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I remove the checkout part (or specify checkout: none) the job fails. It seems it's not in the directory anymore.

I think it's because these two jobs (the UI tests and the new pod lib lint) are executed in parallel.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see it is a different job, nvm

@diegojerezba diegojerezba force-pushed the diegoje/automate-cocoapods-lib-lint branch from e62422f to e53a3e2 Compare May 13, 2024 13:21
@diegojerezba diegojerezba changed the title [DO NOT MERGE] Automate Cocoapods lib lint Automate Cocoapods lib lint May 13, 2024
@diegojerezba diegojerezba force-pushed the diegoje/automate-cocoapods-lib-lint branch from 1e4cbc0 to 7108d82 Compare May 14, 2024 09:25
@diegojerezba diegojerezba merged commit 5a1e6bb into dev May 15, 2024
6 checks passed
@diegojerezba diegojerezba deleted the diegoje/automate-cocoapods-lib-lint branch May 15, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants