| #!/bin/bash |
| # |
| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| # |
| # Bumps the version of all dependencies of this repo to the latest version. |
| # Because some of them use the Fuchsia SDK, they must be kept in lockstep to |
| # prevent Fuchsia SDK incompatiblities. |
| # |
| # Usage: |
| # update_dependencies.sh |
| # |
| # Requirements: |
| # 1. $FUCHSIA_EMBEDDER_DIR is set to your flutter-embedder.git checkout. |
| # |
| # Arguments: |
| # --cleanup: Removes old product bundles and shuts down old emulators. |
| # Default: false |
| |
| set -e # Fail on any error. |
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/echo_helpers.sh || exit $? |
| |
| # Parse arguments. |
| cleanup_args= |
| while [[ $# -gt 0 ]]; do |
| case $1 in |
| --cleanup) |
| cleanup_args="--cleanup" |
| shift # past argument |
| ;; |
| *) |
| shift # past value |
| ;; |
| esac |
| done |
| |
| # First bump Flutter. |
| git -C $FUCHSIA_EMBEDDER_DIR/third_party/dart-pkg/internal/flutter/flutter pull origin main |
| # Then bump Flutter Engine to match Flutter. |
| $FUCHSIA_EMBEDDER_DIR/scripts/sync_engine_artifacts_to_revision.sh $(cat $FUCHSIA_EMBEDDER_DIR/third_party/dart-pkg/internal/flutter/flutter/bin/internal/engine.version) |
| # Bump the Embedder's Fuchsia SDK to whatever is the latest version and pray that the |
| # Engine's Fuchsia SDK is close enough to prevent incompatibility issues. |
| # TODO(akbiggs): Keep the Fuchsia SDK version in sync between the Emebedder repo and |
| # Engine repo. |
| $FUCHSIA_EMBEDDER_DIR/scripts/update_fuchsia_sdk.sh ${cleanup_args} |
| |