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

feat: tag canaries for cocoapods plugin #1702

Merged
merged 10 commits into from
Jan 11, 2021

Conversation

hborawski
Copy link
Collaborator

@hborawski hborawski commented Jan 6, 2021

What Changed

Add canary support for cocoapods.

During canary hook, rewrite the source location in the podspec to the current remote pointing to the latest commit

then push it up and reset the podspec

i tested this out and committing the modified podspec isnt necessary (unless we'd need to read the version from it?)

Why

canaries are useful

Todo:

  • Add tests
  • Add docs

Change Type

Indicate the type of change your pull request is:

  • documentation
  • patch
  • minor
  • major
📦 Published PR as canary version: under canary scope @auto-canary@10.5.1-canary.1702.20954.0

✨ Test out this PR locally via:

npm install @auto-canary/bot-list@10.5.1-canary.1702.20954.0
npm install @auto-canary/auto@10.5.1-canary.1702.20954.0
npm install @auto-canary/core@10.5.1-canary.1702.20954.0
npm install @auto-canary/all-contributors@10.5.1-canary.1702.20954.0
npm install @auto-canary/brew@10.5.1-canary.1702.20954.0
npm install @auto-canary/chrome@10.5.1-canary.1702.20954.0
npm install @auto-canary/cocoapods@10.5.1-canary.1702.20954.0
npm install @auto-canary/conventional-commits@10.5.1-canary.1702.20954.0
npm install @auto-canary/crates@10.5.1-canary.1702.20954.0
npm install @auto-canary/docker@10.5.1-canary.1702.20954.0
npm install @auto-canary/exec@10.5.1-canary.1702.20954.0
npm install @auto-canary/first-time-contributor@10.5.1-canary.1702.20954.0
npm install @auto-canary/gem@10.5.1-canary.1702.20954.0
npm install @auto-canary/gh-pages@10.5.1-canary.1702.20954.0
npm install @auto-canary/git-tag@10.5.1-canary.1702.20954.0
npm install @auto-canary/gradle@10.5.1-canary.1702.20954.0
npm install @auto-canary/jira@10.5.1-canary.1702.20954.0
npm install @auto-canary/maven@10.5.1-canary.1702.20954.0
npm install @auto-canary/microsoft-teams@10.5.1-canary.1702.20954.0
npm install @auto-canary/npm@10.5.1-canary.1702.20954.0
npm install @auto-canary/omit-commits@10.5.1-canary.1702.20954.0
npm install @auto-canary/omit-release-notes@10.5.1-canary.1702.20954.0
npm install @auto-canary/pr-body-labels@10.5.1-canary.1702.20954.0
npm install @auto-canary/released@10.5.1-canary.1702.20954.0
npm install @auto-canary/s3@10.5.1-canary.1702.20954.0
npm install @auto-canary/slack@10.5.1-canary.1702.20954.0
npm install @auto-canary/twitter@10.5.1-canary.1702.20954.0
npm install @auto-canary/upload-assets@10.5.1-canary.1702.20954.0
# or 
yarn add @auto-canary/bot-list@10.5.1-canary.1702.20954.0
yarn add @auto-canary/auto@10.5.1-canary.1702.20954.0
yarn add @auto-canary/core@10.5.1-canary.1702.20954.0
yarn add @auto-canary/all-contributors@10.5.1-canary.1702.20954.0
yarn add @auto-canary/brew@10.5.1-canary.1702.20954.0
yarn add @auto-canary/chrome@10.5.1-canary.1702.20954.0
yarn add @auto-canary/cocoapods@10.5.1-canary.1702.20954.0
yarn add @auto-canary/conventional-commits@10.5.1-canary.1702.20954.0
yarn add @auto-canary/crates@10.5.1-canary.1702.20954.0
yarn add @auto-canary/docker@10.5.1-canary.1702.20954.0
yarn add @auto-canary/exec@10.5.1-canary.1702.20954.0
yarn add @auto-canary/first-time-contributor@10.5.1-canary.1702.20954.0
yarn add @auto-canary/gem@10.5.1-canary.1702.20954.0
yarn add @auto-canary/gh-pages@10.5.1-canary.1702.20954.0
yarn add @auto-canary/git-tag@10.5.1-canary.1702.20954.0
yarn add @auto-canary/gradle@10.5.1-canary.1702.20954.0
yarn add @auto-canary/jira@10.5.1-canary.1702.20954.0
yarn add @auto-canary/maven@10.5.1-canary.1702.20954.0
yarn add @auto-canary/microsoft-teams@10.5.1-canary.1702.20954.0
yarn add @auto-canary/npm@10.5.1-canary.1702.20954.0
yarn add @auto-canary/omit-commits@10.5.1-canary.1702.20954.0
yarn add @auto-canary/omit-release-notes@10.5.1-canary.1702.20954.0
yarn add @auto-canary/pr-body-labels@10.5.1-canary.1702.20954.0
yarn add @auto-canary/released@10.5.1-canary.1702.20954.0
yarn add @auto-canary/s3@10.5.1-canary.1702.20954.0
yarn add @auto-canary/slack@10.5.1-canary.1702.20954.0
yarn add @auto-canary/twitter@10.5.1-canary.1702.20954.0
yarn add @auto-canary/upload-assets@10.5.1-canary.1702.20954.0

@adierkens adierkens added the minor Increment the minor version when merged label Jan 6, 2021
@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #1702 (ac02033) into master (bab8eb5) will increase coverage by 0.12%.
The diff coverage is 85.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1702      +/-   ##
==========================================
+ Coverage   80.23%   80.36%   +0.12%     
==========================================
  Files          61       61              
  Lines        4665     4706      +41     
  Branches     1063     1025      -38     
==========================================
+ Hits         3743     3782      +39     
+ Misses        633      630       -3     
- Partials      289      294       +5     
Impacted Files Coverage Δ
plugins/cocoapods/src/index.ts 88.70% <85.33%> (+3.16%) ⬆️
packages/core/src/auto.ts 78.41% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bab8eb5...ac02033. Read the comment docs.

Copy link
Collaborator

@hipstersmoothie hipstersmoothie left a comment

Choose a reason for hiding this comment

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

This looks great! Does the canary need to be tagged for the pod? Could it just point to a commit hash? How does it work with forks?

@hborawski
Copy link
Collaborator Author

Yeah the default way (and in the instance of this plugin, the supported way) of specifying a version in a podspec is to point to the tag, thats how majority of pods are set up. I dont have any code in here for being able to modify that portion of the podspec

for example -> https://github.com/Alamofire/Alamofire/blob/master/Alamofire.podspec#L8

One of the consequences of the podspec being a ruby file, it could end up being challenging to parse that in order to switch it between a hash (which im not sure is supported or not, it probably is) and back to a tag for a release

Forks is a good point, I'm not sure how it would work with a fork, im going to do some experimentation with this canary build to validate use cases

@hborawski
Copy link
Collaborator Author

ok i refactored this (and forgot to change my git email for the commits, whatever). so i rewrite the source location to point to the remote/commit hash so it should work for forks, i'll need to test the canary of this PR out to totally verify, i looked through the core code and i think that auto.remote should be the fork remote

Copy link
Collaborator

@hipstersmoothie hipstersmoothie left a comment

Choose a reason for hiding this comment

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

WOOT! 🎖️ Great job here! It's awesome to see canaries coming to other platforms!

@hipstersmoothie hipstersmoothie merged commit d665667 into intuit:master Jan 11, 2021
@adierkens
Copy link
Collaborator

🚀 PR was released in v10.6.0 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Jan 11, 2021
@hborawski hborawski deleted the cocoapod-canaries branch January 12, 2021 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants