Skip to content

Twiggle bit to exclude dev and beta from desktop and web#35221

Merged
jonahwilliams merged 5 commits intoflutter:masterfrom
jonahwilliams:toggle_bit
Jun 28, 2019
Merged

Twiggle bit to exclude dev and beta from desktop and web#35221
jonahwilliams merged 5 commits intoflutter:masterfrom
jonahwilliams:toggle_bit

Conversation

@jonahwilliams
Copy link
Contributor

@jonahwilliams jonahwilliams commented Jun 27, 2019

No description provided.

Copy link
Member

@zanderso zanderso left a comment

Choose a reason for hiding this comment

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

lgtm w/ nit

/// Whether we are currently on the master branch.
bool get isMaster {
final String branchName = getBranchName();
return branchName != 'stable' && branchName != 'dev' && branchName != 'beta';
Copy link
Member

Choose a reason for hiding this comment

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

How about

return !<String>['dev', 'beta', 'stable].contains(branchName);

case TargetPlatform.windows_x64:
case TargetPlatform.linux_x64:
if (FlutterVersion.instance.isStable) {
if (!FlutterVersion.instance.isMaster) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this trigger for people who have renamed their master branch (e.g. folks working on this feature)? I guess if it does we'll find out and can easily fix it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, another way to handle this would be to have a helper function isDesktopEnabled() and isWebEnabled() so that we can change this rule later w/o having to find all 10 spots again. :)

/// Whether we are currently on the master branch.
bool get isMaster {
final String branchName = getBranchName();
return !<String>['dev', 'beta', 'stable'].contains(branchName);
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels like it will fail for people who are working on a git branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unless we also want to stop all flutter engineers from working it, we'll need to permit user branches somehow

@Piinks Piinks added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 27, 2019
@codecov
Copy link

codecov bot commented Jun 27, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@04e2f22). Click here to learn what that means.
The diff coverage is 56.25%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #35221   +/-   ##
=========================================
  Coverage          ?   52.48%           
=========================================
  Files             ?      175           
  Lines             ?    16513           
  Branches          ?        0           
=========================================
  Hits              ?     8667           
  Misses            ?     7846           
  Partials          ?        0
Flag Coverage Δ
#flutter_tool 52.48% <56.25%> (?)
Impacted Files Coverage Δ
...ackages/flutter_tools/lib/src/commands/create.dart 67.54% <0%> (ø)
...s/flutter_tools/lib/src/commands/build_bundle.dart 93.87% <0%> (ø)
...kages/flutter_tools/lib/src/commands/precache.dart 91.3% <100%> (ø)
packages/flutter_tools/lib/src/commands/run.dart 64.21% <100%> (ø)
packages/flutter_tools/lib/src/version.dart 96.11% <100%> (ø)
.../flutter_tools/lib/src/runner/flutter_command.dart 82.66% <25%> (ø)
packages/flutter_tools/lib/src/desktop.dart 78.57% <50%> (ø)
packages/flutter_tools/lib/src/web/workflow.dart 77.77% <50%> (ø)

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 04e2f22...b763ea3. Read the comment docs.

@jonahwilliams jonahwilliams merged commit a1d3edc into flutter:master Jun 28, 2019
@jonahwilliams jonahwilliams deleted the toggle_bit branch June 28, 2019 02:04
@tvolkert tvolkert mentioned this pull request Jul 1, 2019
tvolkert added a commit that referenced this pull request Jul 1, 2019
Cherry-pick the following PRs onto v1.7.8-hotfixes to prepare for release.

flutter/engine#9581
flutter/engine#9464
#35221
johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
KevinG2011 pushed a commit to pepper-ios/flutter that referenced this pull request Apr 23, 2020
Cherry-pick the following PRs onto v1.7.8-hotfixes to prepare for release.

flutter/engine#9581
flutter/engine#9464
flutter#35221
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants