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

Beta toggle #240

Closed
wants to merge 33 commits into from
Closed

Beta toggle #240

wants to merge 33 commits into from

Conversation

SimplyAhmazing
Copy link
Contributor

This PR implements beta toggle in the app. Several things here,

  • Updated electron-builder to 18.4.0 -- the latest wasn't quite stable for me but this version is
  • Updated electron and spectron versions ==> we may have resolved the rendering issues on OSX 10.10 because of this update
  • Cleaned up app-shell/package.json to remove unneeded deps

How the feature works,

  • download the app, go to File > Use Beta App. Wait a few minutes and restart the app in order to get beta build
  • To switch back, go to File > Use Beta App. Wait a few minutes. A popup will come alerting that there's a new version

This feature is possible because the latest electron-builder allows for channels for updating. There is a stable channel and a beta channel. These channels are tracked in S3 folders. When the app builds on master an app artifact is pushed to the S3 beta bucket. When the app is built on in a release tag the resulting artifact is pushed to the S3 stable folder.

When the app builds a beta that beta is labeled with the patch and build number are cantor and shifted by +1000. This is because the electron-updater recognizes build updates only when the major, minor, or patch has increased. But when neither one of those has increased and only the build (which represents a commit from versioneer) has increased it is not noticeable to the updater. The patch number is shifted by a 1000 s.t. that when the app loads it determines that if the patch # less a 1000 is greater than 0, then this is a beta build and it should therefore cantor decode the patch number.

@@ -92,3 +121,30 @@ def tag_from_ci_env_vars(ci_name, pull_request_var, branch_var, commit_var):
return None


def republish_win_s3(yml_file, exe_file):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this can be deleted..

os.environ['CHANNEL'] = 'beta'
elif 'CHANNEL' not in os.environ:
# os.environ['CHANNEL'] = 'dev'
os.environ['CHANNEL'] = 'beta'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should be removed and previous line is uncommented before merge into master

@SimplyAhmazing
Copy link
Contributor Author

Also wanted to note that from this feature onwards, releases for win and mac through auto-updater will be dictated by S3 buckets. Particularly ot-app-builds/channels/<stable|beta> will hold the location of the latest assets to deploy.

We can do a few trial releases using git tags to test this new deployment setup

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.212% when pulling b93e60a on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.212% when pulling b93e60a on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling e20061a on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling 812c13f on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling 0722817 on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling 0722817 on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling 0722817 on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 9, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling 0722817 on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

coveralls commented Jun 13, 2017

Coverage Status

Coverage increased (+0.03%) to 91.211% when pulling 47b394c on beta-toggle into 2f8eac7 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0008%) to 91.183% when pulling 47b394c on beta-toggle into 2f8eac7 on master.

@mcous mcous deleted the beta-toggle branch November 2, 2017 19:06
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

2 participants