Skip to content

Commit

Permalink
Minor ad-hoc fixes
Browse files Browse the repository at this point in the history
- fix http verb for marking release as finished
- fix default config generation for cross-platform apps when one store
  is not connected
- add a missing passport translation
- stamp triggered for play store submission before upload job
- fix back button for the release activity page to go to release always
  • Loading branch information
nid90 committed Jan 9, 2025
1 parent 3c36f74 commit c356c7e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
size: :xxs,
options: finish_release_release_path(release),
label: "Mark release as finished",
html_options: html_opts(:delete, "You have finished release to only one of the platforms. Are you sure you want to finish the release?")) do |b|
html_options: html_opts(:post, "You have finished release to only one of the platforms. Are you sure you want to finish the release?")) do |b|
b.with_icon("v2/list_checks.svg")
end %>
<% end %>
Expand Down
4 changes: 4 additions & 0 deletions app/models/integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ def existing_integration(app, providable_type)
app.integrations.connected.find_by(providable_type: providable_type)
end

def build_channels_for_platform(platform)
kept.build_channel.filter { |b| ALLOWED_INTEGRATIONS_FOR_APP[platform.to_sym][:build_channel].include?(b.providable_type) }
end

private

def providable_error_message(meta)
Expand Down
2 changes: 1 addition & 1 deletion app/models/play_store_submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def trigger!
return unless actionable?

preprocess!
event_stamp!(reason: :triggered, kind: :notice, data: stamp_data)
StoreSubmissions::PlayStore::UploadJob.perform_later(id)
end

Expand Down Expand Up @@ -262,7 +263,6 @@ def fully_release_previous_production_rollout!
private

def on_start_prepare!
event_stamp!(reason: :triggered, kind: :notice, data: stamp_data)
StoreSubmissions::PlayStore::PrepareForReleaseJob.perform_later(id)
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/release_platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def set_default_config
end

if base_config_map[:production_release].nil?
providable = app.integrations.build_channel.first.providable
providable = app.integrations.build_channels_for_platform(platform).first.providable
providable_type = providable.class
submission_type = Integration::INTEGRATIONS_TO_PRE_PROD_SUBMISSIONS[platform.to_sym][providable_type].to_s
submission_config = providable.pick_default_beta_channel
Expand Down
2 changes: 1 addition & 1 deletion app/views/releases/timeline.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= render V2::ContainerComponent.new(title: "Release Activity") do |container| %>
<% container.with_back_button(to: "the release") %>
<% container.with_back_button(to: "the release", path: release_path(@release)) %>
<% container.with_body do %>
<turbo-frame id="events" data-turbo-action="replace">
<% if @app.cross_platform? %>
Expand Down
3 changes: 2 additions & 1 deletion config/locales/passport/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ en:
triggered_html: 'Triggered a new draft release for <span class="emphasize">%{version} (%{build_number})</span> to the Play Store track <span class="emphasize">%{track}</span>'
prepared_html: 'Prepared a new draft release for <span class="emphasize">%{version} (%{build_number})</span> to the Play Store track <span class="emphasize">%{track}</span>'
review_rejected_html: 'Play Store submission for <span class="emphasize">%{version} (%{build_number})</span> was rejected'
failed_html: 'Failed to create a draft release for <span class="emphasize">%{version} (%{build_number})</span> to the Play Store track <span class="emphasize">%{track}</span>. Error – <span class="emphasize">%{failure_reason}</span>'
failed_html: 'Failed to create a release for <span class="emphasize">%{version} (%{build_number})</span> to the Play Store track <span class="emphasize">%{track}</span>. Error – <span class="emphasize">%{failure_reason}</span>'
finished_manually_html: 'Marked the release for <span class="emphasize">%{version} (%{build_number})</span> as finished manually'
app_store_submission:
triggered_html: 'Triggered a new store release for <span class="emphasize">%{version} (%{build_number})</span> in the App Store'
Expand All @@ -75,6 +75,7 @@ en:
completed_html: 'Completed the rollout of <span class="emphasize">%{version} (%{build_number})</span> to Play Store <span class="emphasize">%{track}</span> track at <span class="emphasize">%{rollout_percentage}%</span>'
fully_released_html: 'Fully released <span class="emphasize">%{version} (%{build_number})</span> to Play Store <span class="emphasize">%{track}</span> track from <span class="emphasize">%{rollout_percentage}%</span>'
finished_manually_html: 'Marked the rollout of <span class="emphasize">%{version} (%{build_number})</span> to Play Store <span class="emphasize">%{track}</span> track as finished manually'
failed_html: 'Failed to rollout <span class="emphasize">%{version} (%{build_number})</span> to Play Store <span class="emphasize">%{track}</span> track'
app_store_rollout:
started_html: 'Started rollout of <span class="emphasize">%{version} (%{build_number})</span> to App Store at phase <span class="emphasize">%{current_stage} (%{rollout_percentage}%)</span>'
updated_html: 'Rollout of <span class="emphasize">%{version} (%{build_number})</span> to App Store is at phase <span class="emphasize">%{current_stage} (%{rollout_percentage}%)</span>'
Expand Down

0 comments on commit c356c7e

Please sign in to comment.