Commit 76964621 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Add git config option to automatically convert CRLF to LF (#8122)

parent f903a1c8
# Auto detect text files and perform LF normalization
* text=auto
# Always perform LF normalization on these files
*.dart text
*.gradle text
*.html text
*.java text
*.json text
*.md text
*.py text
*.sh text
*.txt text
*.xml text
*.yaml text
# Make sure that these Windows files always have CRLF line endings in checkout
*.bat text eol=crlf
*.ps1 text eol=crlf
# Never perform LF normalization on these files
*.ico binary
*.jar binary
*.png binary
*.zip binary
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# ---------------------------------- NOTE ---------------------------------- #
#
# Please keep the logic in this file consistent with the logic in the
# `update_dart_sdk.sh` script in the same directory to ensure that Flutter
# continues to work across all platforms!
#
# -------------------------------------------------------------------------- #
$ErrorActionPreference = "Stop"
$progName = split-path -parent $MyInvocation.MyCommand.Definition
$flutterRoot = (get-item $progName ).parent.parent.FullName
$dartSdkPath = "$flutterRoot\bin\cache\dart-sdk"
$dartSdkStampPath = "$flutterRoot\bin\cache\dart-sdk.stamp"
$dartSdkVersion = (Get-Content "$flutterRoot\bin\internal\dart-sdk.version")
if ((Test-Path $dartSdkStampPath) -and ($dartSdkVersion -eq (Get-Content $dartSdkStampPath))) {
return
}
Write-Host "Downloading Dart SDK $dartSdkVersion..."
$dartZipName = "dartsdk-windows-x64-release.zip"
$dartChannel = if ($dartSdkVersion.Contains("-dev.")) {"dev"} else {"stable"}
$dartSdkUrl = "https://storage.googleapis.com/dart-archive/channels/$dartChannel/raw/$dartSdkVersion/sdk/$dartZipName"
if (Test-Path $dartSdkPath) { Remove-Item $dartSdkPath -Recurse }
New-Item $dartSdkPath -force -type directory | Out-Null
$dartSdkZip = "$flutterRoot\bin\cache\dart-sdk.zip"
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory($dartSdkZip, "$flutterRoot\bin\cache")
Remove-Item $dartSdkZip
$dartSdkVersion | out-file $dartSdkStampPath
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# ---------------------------------- NOTE ---------------------------------- #
#
# Please keep the logic in this file consistent with the logic in the
# `update_dart_sdk.sh` script in the same directory to ensure that Flutter
# continues to work across all platforms!
#
# -------------------------------------------------------------------------- #
$ErrorActionPreference = "Stop"
$progName = split-path -parent $MyInvocation.MyCommand.Definition
$flutterRoot = (get-item $progName ).parent.parent.FullName
$dartSdkPath = "$flutterRoot\bin\cache\dart-sdk"
$dartSdkStampPath = "$flutterRoot\bin\cache\dart-sdk.stamp"
$dartSdkVersion = (Get-Content "$flutterRoot\bin\internal\dart-sdk.version")
if ((Test-Path $dartSdkStampPath) -and ($dartSdkVersion -eq (Get-Content $dartSdkStampPath))) {
return
}
Write-Host "Downloading Dart SDK $dartSdkVersion..."
$dartZipName = "dartsdk-windows-x64-release.zip"
$dartChannel = if ($dartSdkVersion.Contains("-dev.")) {"dev"} else {"stable"}
$dartSdkUrl = "https://storage.googleapis.com/dart-archive/channels/$dartChannel/raw/$dartSdkVersion/sdk/$dartZipName"
if (Test-Path $dartSdkPath) { Remove-Item $dartSdkPath -Recurse }
New-Item $dartSdkPath -force -type directory | Out-Null
$dartSdkZip = "$flutterRoot\bin\cache\dart-sdk.zip"
Start-BitsTransfer -Source $dartSdkUrl -Destination $dartSdkZip
Add-Type -assembly "system.io.compression.filesystem"
[io.compression.zipfile]::ExtractToDirectory($dartSdkZip, "$flutterRoot\bin\cache")
Remove-Item $dartSdkZip
$dartSdkVersion | out-file $dartSdkStampPath
e5715e2cc0d5644a241a4b3281bfada92bc145c2
e5715e2cc0d5644a241a4b3281bfada92bc145c2
This diff is collapsed.
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