Unverified Commit 52bb198f authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Remove master from API docs (#144425)

parent 6995275b
...@@ -115,8 +115,8 @@ function generate_docs() { ...@@ -115,8 +115,8 @@ function generate_docs() {
# Install and activate the snippets tool, which resides in the # Install and activate the snippets tool, which resides in the
# assets-for-api-docs repo: # assets-for-api-docs repo:
# https://github.com/flutter/assets-for-api-docs/tree/master/packages/snippets # https://github.com/flutter/assets-for-api-docs/tree/main/packages/snippets
"$DART" pub global activate snippets 0.4.2 "$DART" pub global activate snippets 0.4.3
# This script generates a unified doc set, and creates # This script generates a unified doc set, and creates
# a custom index.html, placing everything into DOC_DIR. # a custom index.html, placing everything into DOC_DIR.
......
...@@ -25,7 +25,7 @@ the following locations: ...@@ -25,7 +25,7 @@ the following locations:
* [Web Embedder](dart-ui_web/dart-ui_web-library.html) * [Web Embedder](dart-ui_web/dart-ui_web-library.html)
* [Installation](https://flutter.dev/docs/get-started/install) * [Installation](https://flutter.dev/docs/get-started/install)
* [Codelabs](https://flutter.dev/docs/codelabs) * [Codelabs](https://flutter.dev/docs/codelabs)
* [Contributing to Flutter](https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md) * [Contributing to Flutter](https://github.com/flutter/flutter/blob/main/CONTRIBUTING.md)
## Offline Documentation ## Offline Documentation
......
...@@ -277,9 +277,13 @@ class Configurator { ...@@ -277,9 +277,13 @@ class Configurator {
void _createPageFooter(Directory footerPath, Version version) { void _createPageFooter(Directory footerPath, Version version) {
final String timestamp = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now()); final String timestamp = DateFormat('yyyy-MM-dd HH:mm').format(DateTime.now());
final String gitBranch = FlutterInformation.instance.getBranchName(); String channel = FlutterInformation.instance.getBranchName();
// Backward compatibility: Still support running on "master", but pretend it is "main".
if (channel == 'master') {
channel = 'main';
}
final String gitRevision = FlutterInformation.instance.getFlutterRevision(); final String gitRevision = FlutterInformation.instance.getFlutterRevision();
final String gitBranchOut = gitBranch.isEmpty ? '' : '• $gitBranch'; final String channelOut = channel.isEmpty ? '' : '• $channel';
footerPath.childFile('footer.html').writeAsStringSync('<script src="footer.js"></script>'); footerPath.childFile('footer.html').writeAsStringSync('<script src="footer.js"></script>');
publishRoot.childDirectory('flutter').childFile('footer.js') publishRoot.childDirectory('flutter').childFile('footer.js')
..createSync(recursive: true) ..createSync(recursive: true)
...@@ -287,11 +291,11 @@ class Configurator { ...@@ -287,11 +291,11 @@ class Configurator {
(function() { (function() {
var span = document.querySelector('footer>span'); var span = document.querySelector('footer>span');
if (span) { if (span) {
span.innerText = 'Flutter $version $timestamp $gitRevision $gitBranchOut'; span.innerText = 'Flutter $version $timestamp $gitRevision $channelOut';
} }
var sourceLink = document.querySelector('a.source-link'); var sourceLink = document.querySelector('a.source-link');
if (sourceLink) { if (sourceLink) {
sourceLink.href = sourceLink.href.replace('/master/', '/$gitRevision/'); sourceLink.href = sourceLink.href.replace('/main/', '/$gitRevision/');
} }
})(); })();
'''); ''');
...@@ -568,7 +572,7 @@ class DartdocGenerator { ...@@ -568,7 +572,7 @@ class DartdocGenerator {
'--link-to-source-root', '--link-to-source-root',
flutterRoot.path, flutterRoot.path,
'--link-to-source-uri-template', '--link-to-source-uri-template',
'https://github.com/flutter/flutter/blob/master/%f%#L%l%', 'https://github.com/flutter/flutter/blob/main/%f%#L%l%',
'--inject-html', '--inject-html',
'--use-base-href', '--use-base-href',
'--header', '--header',
......
...@@ -288,7 +288,7 @@ void main() { ...@@ -288,7 +288,7 @@ void main() {
'--link-to-source-root', '--link-to-source-root',
'/flutter', '/flutter',
'--link-to-source-uri-template', '--link-to-source-uri-template',
'https://github.com/flutter/flutter/blob/master/%f%#L%l%', 'https://github.com/flutter/flutter/blob/main/%f%#L%l%',
'--inject-html', '--inject-html',
'--use-base-href', '--use-base-href',
'--header', '--header',
...@@ -372,7 +372,7 @@ void main() { ...@@ -372,7 +372,7 @@ void main() {
'--link-to-source-root', '--link-to-source-root',
'/flutter', '/flutter',
'--link-to-source-uri-template', '--link-to-source-uri-template',
'https://github.com/flutter/flutter/blob/master/%f%#L%l%', 'https://github.com/flutter/flutter/blob/main/%f%#L%l%',
'--inject-html', '--inject-html',
'--use-base-href', '--use-base-href',
'--header', '--header',
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
/// on flutter.dev. /// on flutter.dev.
/// * [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial) /// * [Animations tutorial](https://flutter.dev/docs/development/ui/animations/tutorial)
/// on flutter.dev. /// on flutter.dev.
/// * [Sample app](https://github.com/flutter/samples/tree/master/animations), /// * [Sample app](https://github.com/flutter/samples/tree/main/animations),
/// which showcases Flutter's animation features. /// which showcases Flutter's animation features.
/// * [ImplicitlyAnimatedWidget] and its subclasses, which are [Widget]s that /// * [ImplicitlyAnimatedWidget] and its subclasses, which are [Widget]s that
/// implicitly animate changes to their properties. /// implicitly animate changes to their properties.
......
...@@ -54,7 +54,7 @@ import 'package:flutter/widgets.dart'; ...@@ -54,7 +54,7 @@ import 'package:flutter/widgets.dart';
/// ``` /// ```
/// {@end-tool} /// {@end-tool}
/// ///
/// For versions 0.1.3 and below, see this [glyph map](https://raw.githubusercontent.com/flutter/packages/master/third_party/packages/cupertino_icons/map.png). /// For versions 0.1.3 and below, see this [glyph map](https://raw.githubusercontent.com/flutter/packages/main/third_party/packages/cupertino_icons/map.png).
/// ///
/// See also: /// See also:
/// ///
......
...@@ -39,7 +39,7 @@ const double _kIndicatorHeight = 32; ...@@ -39,7 +39,7 @@ const double _kIndicatorHeight = 32;
/// Adaptive layouts can build different instances of the [Scaffold] in order to /// Adaptive layouts can build different instances of the [Scaffold] in order to
/// have a navigation rail for more horizontal layouts and a bottom navigation /// have a navigation rail for more horizontal layouts and a bottom navigation
/// bar for more vertical layouts. See /// bar for more vertical layouts. See
/// [the adaptive_scaffold.dart sample](https://github.com/flutter/samples/blob/master/experimental/web_dashboard/lib/src/widgets/third_party/adaptive_scaffold.dart) /// [the adaptive_scaffold.dart sample](https://github.com/flutter/samples/blob/main/experimental/web_dashboard/lib/src/widgets/third_party/adaptive_scaffold.dart)
/// for an example. /// for an example.
/// ///
/// {@tool dartpad} /// {@tool dartpad}
......
...@@ -274,7 +274,7 @@ class Directionality extends _UbiquitousInheritedWidget { ...@@ -274,7 +274,7 @@ class Directionality extends _UbiquitousInheritedWidget {
/// ///
/// ```dart /// ```dart
/// Image.network( /// Image.network(
/// 'https://raw.githubusercontent.com/flutter/assets-for-api-docs/master/packages/diagrams/assets/blend_mode_destination.jpeg', /// 'https://raw.githubusercontent.com/flutter/assets-for-api-docs/main/packages/diagrams/assets/blend_mode_destination.jpeg',
/// color: const Color.fromRGBO(255, 255, 255, 0.5), /// color: const Color.fromRGBO(255, 255, 255, 0.5),
/// colorBlendMode: BlendMode.modulate /// colorBlendMode: BlendMode.modulate
/// ) /// )
......
...@@ -45,7 +45,7 @@ typedef InteractiveViewerWidgetBuilder = Widget Function(BuildContext context, Q ...@@ -45,7 +45,7 @@ typedef InteractiveViewerWidgetBuilder = Widget Function(BuildContext context, Q
/// size of the area that should be interactive. /// size of the area that should be interactive.
/// ///
/// See also: /// See also:
/// * The [Flutter Gallery's transformations demo](https://github.com/flutter/gallery/blob/master/lib/demos/reference/transformations_demo.dart), /// * The [Flutter Gallery's transformations demo](https://github.com/flutter/gallery/blob/main/lib/demos/reference/transformations_demo.dart),
/// which includes the use of InteractiveViewer. /// which includes the use of InteractiveViewer.
/// * The [flutter-go demo](https://github.com/justinmc/flutter-go), which includes robust positioning of an InteractiveViewer child /// * The [flutter-go demo](https://github.com/justinmc/flutter-go), which includes robust positioning of an InteractiveViewer child
/// that works for all screen sizes and child sizes. /// that works for all screen sizes and child sizes.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment