You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a bunch of old Expo builds published from every PR since #70 landed. This doesn't seem to be a problem yet, but it could make Expo annoyed with us at some point in the future. We should really be cleaning these up as we merge each PR, so that the temporary build only lives as long as the PR.
Plan of action
When deploying from master, change app and storybook release channel names to master or staging (to distinguish them from PR/dev-branch deployments)
When CI runs on master, clean up release channels for closed PRs / deleted branches
Unfortunately, CircleCI seems to lack the ability to run a script in response to merging a PR, so it's tricky to get the PR number as it's being merged. We can take a brute-force approach instead, which also has the benefit of clearing out the old deployments that have already accumulated.
Possible algorithm:
Collect the commit shas for all non-master branches in the repo; this is the list of "active" commits (those with an Expo deployment that should remain live)
Use the Github API (see ci/post-expo-comment.js for an example) to identify any branches that match closed PRs; remove those shas from the active list
List all Expo deployments; prune the active ones from the list
Unpublish (publish:rollback) the remaining, inactive deployments.
Motivation
We have a bunch of old Expo builds published from every PR since #70 landed. This doesn't seem to be a problem yet, but it could make Expo annoyed with us at some point in the future. We should really be cleaning these up as we merge each PR, so that the temporary build only lives as long as the PR.
Plan of action
master
, change app and storybook release channel names tomaster
orstaging
(to distinguish them from PR/dev-branch deployments)master
, clean up release channels for closed PRs / deleted branchesmaster
branches in the repo; this is the list of "active" commits (those with an Expo deployment that should remain live)publish:rollback
) the remaining, inactive deployments.See Expo docs for CLI details.
The text was updated successfully, but these errors were encountered: