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

Backwards compatibility for master/main #243

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/snippets/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.3

* Backwards compatibility: Substitute in "main" when running on "master" channel.

## 0.4.2

* Switch master channel to main.
Expand Down
6 changes: 5 additions & 1 deletion packages/snippets/bin/snippets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ String getChannelName({
ProcessManager processManager = const LocalProcessManager(),
}) {
final String? envReleaseChannel = platform.environment['LUCI_BRANCH']?.trim();
if (<String>['master', 'stable'].contains(envReleaseChannel)) {
if (<String>['master', 'stable', 'main'].contains(envReleaseChannel)) {
// Backward compatibility: Still support running on "master", but pretend it is "main".
if (envReleaseChannel == 'master') {
return 'main';
}
return envReleaseChannel!;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/snippets/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: snippets
description: A package for parsing and manipulating code samples in Flutter repo dartdoc comments.
repository: https://github.com/flutter/assets-for-api-docs/tree/main/packages/snippets
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+snippets%22
version: 0.4.2
version: 0.4.3

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down
Loading