Skip to content

Pass $CIRCLE_BRANCH to prepare_next_version#583

Merged
taquitos merged 2 commits into
mainfrom
branch_weird
Aug 5, 2022
Merged

Pass $CIRCLE_BRANCH to prepare_next_version#583
taquitos merged 2 commits into
mainfrom
branch_weird

Conversation

@taquitos

@taquitos taquitos commented Aug 5, 2022

Copy link
Copy Markdown
Contributor

resolves SDKONCALL-84

It seems that CircleCI is calling:

prepare_next_version with no options, so the check here:

  lane :prepare_next_version do |options|
    create_next_snapshot_version(
      current_version: current_version_number,
      repo_name: repo_name,
      github_pr_token: ENV["GITHUB_PULL_REQUEST_API_TOKEN"],
      files_to_update: files_with_version_number,
      branch: options[:branch] || 'main'
    )
  end

branch: options[:branch] || 'main' is falling back to main. When we're deploying from a tag, we're not on main.

@taquitos taquitos requested review from a team and tonidero August 5, 2022 19:08

@NachoSoto NachoSoto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this makes sense 👍🏻
We don't want to make fastlane read such a specific environment variable.

@tonidero

tonidero commented Aug 5, 2022

Copy link
Copy Markdown
Contributor

Yeah I think this solution makes sense. Additionally, we probably want to make the branch parameter for this action non-optional and not default to anything in the plugin. I thought we were creating the tag from main, but it's true it's safer to create the tag from the branch. I will change that on monday and remove the default to main here. Thanks for fixing this!

@taquitos

taquitos commented Aug 5, 2022

Copy link
Copy Markdown
Contributor Author

I thought we were creating the tag from main,
We are still, it's just that the deploy runs from the tag, so the check to ensure we're on main fails.

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.

3 participants