Use dart pub instead of dart __deprecated pub (#121605)

This commit is contained in:
Sigurd Meldgaard
2023-03-06 11:23:12 +01:00
committed by GitHub
parent d940ec1f76
commit 7a28078509
7 changed files with 62 additions and 42 deletions

View File

@@ -21,7 +21,7 @@ function pub_upgrade_with_retry {
local total_tries="10"
local remaining_tries=$((total_tries - 1))
while [[ "$remaining_tries" -gt 0 ]]; do
(cd "$FLUTTER_TOOLS_DIR" && "$DART" __deprecated_pub upgrade "$VERBOSITY" --no-precompile) && break
(cd "$FLUTTER_TOOLS_DIR" && "$DART" --no-analytics pub upgrade) && break
>&2 echo "Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... ($remaining_tries tries left)"
remaining_tries=$((remaining_tries - 1))
sleep 5
@@ -143,10 +143,10 @@ function upgrade_flutter () (
>&2 echo Building flutter tool...
# Prepare packages...
VERBOSITY="--verbosity=error"
if [[ "$CI" == "true" || "$BOT" == "true" || "$CONTINUOUS_INTEGRATION" == "true" || "$CHROME_HEADLESS" == "1" ]]; then
PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_bot"
VERBOSITY="--verbosity=normal"
else
export PUB_SUMMARY_ONLY=1
fi
export PUB_ENVIRONMENT="$PUB_ENVIRONMENT:flutter_install"
if [[ -d "$FLUTTER_ROOT/.pub-cache" ]]; then