diff --git a/coin/provisioning/common/macos/homebrew.sh b/coin/provisioning/common/macos/homebrew.sh index 4f3a93ba..9c0ef681 100755 --- a/coin/provisioning/common/macos/homebrew.sh +++ b/coin/provisioning/common/macos/homebrew.sh @@ -1,23 +1,71 @@ #!/bin/bash -#Copyright (C) 2023 The Qt Company Ltd +#Copyright (C) 2025 The Qt Company Ltd #SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only # Will install homebrew package manager for macOS. # WARNING: Requires commandlinetools - set -e +INSTALLTYPE="$1" +VERSION="$2" +CHECKSUM="$3" + +DEFAULT_PKG_VERSION="4.4.21" +DEFAULT_PKG_VERSION_CHECKSUM="cd83c4123d5db7d07eb3042f1c785ed7f599183c5c542040bc6abfa722583861" +DEFAULT_GIT_VERSION="deb02e27d99fd2cb27ae16760e3a5272b612fded" +DEFAULT_GIT_VERSION_CHECKSUM="a30b9fbf0d5c2cff3eb1d0643cceee30d8ba6ea1bb7bcabf60d3188bd62e6ba6" + source "$(dirname "$0")"/../../common/unix/DownloadURL.sh +source "$(dirname "$0")"/../../common/unix/SetEnvVar.sh +installPkg() { + if [ "$VERSION" == "" ]; then + VERSION="$DEFAULT_PKG_VERSION" + CHECKSUM="$DEFAULT_PKG_VERSION_CHECKSUM" + fi + DownloadURL \ + "http://ci-files01-hki.ci.qt.io/input/mac/homebrew/$VERSION/Homebrew-$VERSION.pkg" \ + "https://github.com/Homebrew/brew/releases/download/$VERSION/Homebrew-$VERSION.pkg" \ + "$CHECKSUM" \ + "/tmp/Homebrew-$VERSION.pkg" -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew-install.c744a716f9845988d01e6e238eee7117b8c366c9.rb \ - https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \ - b9782cc0b550229de77b429b56ffce04157e60486ab9df00461ccf3dad565b0a \ - /tmp/homebrew_install -/usr/bin/ruby /tmp/homebrew_install > ~/versions.txt +} + +installGit() { + if [ "$VERSION" == "" ]; then + VERSION="$DEFAULT_GIT_VERSION" + CHECKSUM="$DEFAULT_GIT_VERSION_CHECKSUM" + fi + + export HOMEBREW_BREW_GIT_REMOTE="https://git.intra.qt.io/external-repository-mirrors/homebrew/brew.git" # put your Git mirror of Homebrew/brew here + export HOMEBREW_CORE_GIT_REMOTE="https://git.intra.qt.io/external-repository-mirrors/homebrew/homebrew-core.git" # put your Git mirror of Homebrew/homebrew-core here + DownloadURL \ + "https://git.intra.qt.io/external-repository-mirrors/homebrew/install/-/raw/$VERSION/install.sh" \ + "https://git.intra.qt.io/external-repository-mirrors/homebrew/install/-/raw/$VERSION/install.sh" \ + $CHECKSUM \ + /tmp/homebrew_install.sh + + DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" + { pw=$(cat "/Users/qt/pw"); } 2> /dev/null + sudo chmod 755 /tmp/homebrew_install.sh + { (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null + rm -f "/Users/qt/pw" +} + +if [ "$INSTALLTYPE" == "GIT" ]; then + installGit +else + installPkg +fi + +# Disable non-ascii output for homebrew to make logs more readable +SetEnvVar "HOMEBREW_NO_COLOR" "1" +SetEnvVar "HOMEBREW_NO_EMOJI" "1" +SetEnvVar "HOMEBREW_NO_ENV_HINTS" "1" diff --git a/coin/provisioning/common/macos/homebrew_for_arm_mac.sh b/coin/provisioning/common/macos/homebrew_for_arm_mac.sh deleted file mode 100755 index e84621ff..00000000 --- a/coin/provisioning/common/macos/homebrew_for_arm_mac.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# Copyright (C) 2021 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only - -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools - - -set -e - -. "$(dirname "$0")"/../unix/DownloadURL.sh -. "$(dirname "$0")"/../unix/SetEnvVar.sh - - -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/be699a568315f57b65519df576d7fc5840b8a5cc/install.sh \ - https://raw.githubusercontent.com/Homebrew/install/be699a568315f57b65519df576d7fc5840b8a5cc/install \ - f20e4a577f0cafbab5a44b4d239886d725b3b985 \ - /tmp/homebrew_install.sh - -DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" -{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null -sudo chmod 755 /tmp/homebrew_install.sh -{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null -rm -f "/Users/qt/pw" - -# No need to manually do `brew update`, the homebrew installer script does it. -### brew update - -SetEnvVar "PATH" "\$PATH:/opt/homebrew/bin" diff --git a/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh index b26d81da..54321000 100755 --- a/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh +++ b/coin/provisioning/qtci-macos-10.15-x86_64/25-homebrew.sh @@ -1,8 +1,12 @@ #!/usr/bin/env bash -#Copyright (C) 2023 The Qt Company Ltd +#Copyright (C) 2025 The Qt Company Ltd #SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -set -e +set -ex + +INSTALLTYPE="GIT" BASEDIR=$(dirname "$0") -"$BASEDIR/../common/macos/homebrew.sh" +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-11-arm/23-homebrew.sh b/coin/provisioning/qtci-macos-11-arm/23-homebrew.sh index c6377114..54321000 100755 --- a/coin/provisioning/qtci-macos-11-arm/23-homebrew.sh +++ b/coin/provisioning/qtci-macos-11-arm/23-homebrew.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex - -set -e +INSTALLTYPE="GIT" BASEDIR=$(dirname "$0") -"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh" +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-11-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-11-x86_64/25-homebrew.sh index f83960f4..54321000 100755 --- a/coin/provisioning/qtci-macos-11-x86_64/25-homebrew.sh +++ b/coin/provisioning/qtci-macos-11-x86_64/25-homebrew.sh @@ -1,28 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2021 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex +INSTALLTYPE="GIT" -set -e - -. "$(dirname "$0")"/../common/unix/DownloadURL.sh - - -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \ - https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \ - 3210da71e12a699ab3bba43910a6d5fc64b92000 \ - /tmp/homebrew_install.sh - -DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" -{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null -sudo chmod 755 /tmp/homebrew_install.sh -{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null -rm -f "/Users/qt/pw" - -# No need to manually do `brew update`, the homebrew installer script does it. -### brew update - +BASEDIR=$(dirname "$0") +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-12-arm/23-homebrew.sh b/coin/provisioning/qtci-macos-12-arm/23-homebrew.sh index c6377114..54321000 100755 --- a/coin/provisioning/qtci-macos-12-arm/23-homebrew.sh +++ b/coin/provisioning/qtci-macos-12-arm/23-homebrew.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex - -set -e +INSTALLTYPE="GIT" BASEDIR=$(dirname "$0") -"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh" +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-12-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-12-x86_64/25-homebrew.sh index f83960f4..54321000 100755 --- a/coin/provisioning/qtci-macos-12-x86_64/25-homebrew.sh +++ b/coin/provisioning/qtci-macos-12-x86_64/25-homebrew.sh @@ -1,28 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2021 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex +INSTALLTYPE="GIT" -set -e - -. "$(dirname "$0")"/../common/unix/DownloadURL.sh - - -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \ - https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \ - 3210da71e12a699ab3bba43910a6d5fc64b92000 \ - /tmp/homebrew_install.sh - -DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" -{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null -sudo chmod 755 /tmp/homebrew_install.sh -{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null -rm -f "/Users/qt/pw" - -# No need to manually do `brew update`, the homebrew installer script does it. -### brew update - +BASEDIR=$(dirname "$0") +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-13-arm/23-homebrew.sh b/coin/provisioning/qtci-macos-13-arm/23-homebrew.sh index 4983540c..0c4ee4fc 100755 --- a/coin/provisioning/qtci-macos-13-arm/23-homebrew.sh +++ b/coin/provisioning/qtci-macos-13-arm/23-homebrew.sh @@ -1,16 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex - -set -e +INSTALLTYPE="PKG" BASEDIR=$(dirname "$0") -"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh" -# Can we force reading bash env this late? -echo "if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi" >> .profile +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-13-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-13-x86_64/25-homebrew.sh index 237dc507..0c4ee4fc 100755 --- a/coin/provisioning/qtci-macos-13-x86_64/25-homebrew.sh +++ b/coin/provisioning/qtci-macos-13-x86_64/25-homebrew.sh @@ -1,28 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex +INSTALLTYPE="PKG" -set -e - -. "$(dirname "$0")"/../common/unix/DownloadURL.sh - - -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \ - https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \ - 3210da71e12a699ab3bba43910a6d5fc64b92000 \ - /tmp/homebrew_install.sh - -DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" -{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null -sudo chmod 755 /tmp/homebrew_install.sh -{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null -rm -f "/Users/qt/pw" - -# No need to manually do `brew update`, the homebrew installer script does it. -### brew update - +BASEDIR=$(dirname "$0") +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-14-arm/23-homebrew.sh b/coin/provisioning/qtci-macos-14-arm/23-homebrew.sh index 4983540c..0c4ee4fc 100755 --- a/coin/provisioning/qtci-macos-14-arm/23-homebrew.sh +++ b/coin/provisioning/qtci-macos-14-arm/23-homebrew.sh @@ -1,16 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex - -set -e +INSTALLTYPE="PKG" BASEDIR=$(dirname "$0") -"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh" -# Can we force reading bash env this late? -echo "if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi" >> .profile +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-14-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-14-x86_64/25-homebrew.sh index 7ff457b7..0c4ee4fc 100755 --- a/coin/provisioning/qtci-macos-14-x86_64/25-homebrew.sh +++ b/coin/provisioning/qtci-macos-14-x86_64/25-homebrew.sh @@ -1,26 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex +INSTALLTYPE="PKG" -set -e - -. "$(dirname "$0")"/../common/unix/DownloadURL.sh - -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/d8f6c666d20a3d42e007ceec161a06651ad92ba331a24a3de62912edb129a522/install.sh \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/d8f6c666d20a3d42e007ceec161a06651ad92ba331a24a3de62912edb129a522/install.sh \ - d8f6c666d20a3d42e007ceec161a06651ad92ba331a24a3de62912edb129a522 \ - /tmp/homebrew_install.sh - -DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" -{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null -sudo chmod 755 /tmp/homebrew_install.sh -{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null -rm -f "/Users/qt/pw" - -# No need to manually do `brew update`, the homebrew installer script does it. -### brew update +BASEDIR=$(dirname "$0") +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-15-arm/23-homebrew.sh b/coin/provisioning/qtci-macos-15-arm/23-homebrew.sh index 4983540c..0c4ee4fc 100755 --- a/coin/provisioning/qtci-macos-15-arm/23-homebrew.sh +++ b/coin/provisioning/qtci-macos-15-arm/23-homebrew.sh @@ -1,16 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex - -set -e +INSTALLTYPE="PKG" BASEDIR=$(dirname "$0") -"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh" -# Can we force reading bash env this late? -echo "if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi" >> .profile +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" diff --git a/coin/provisioning/qtci-macos-15-x86_64/25-homebrew.sh b/coin/provisioning/qtci-macos-15-x86_64/25-homebrew.sh index 7ff457b7..0c4ee4fc 100755 --- a/coin/provisioning/qtci-macos-15-x86_64/25-homebrew.sh +++ b/coin/provisioning/qtci-macos-15-x86_64/25-homebrew.sh @@ -1,26 +1,12 @@ #!/usr/bin/env bash -# Copyright (C) 2023 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#Copyright (C) 2025 The Qt Company Ltd +#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only -# Will install homebrew package manager for macOS. -# WARNING: Requires commandlinetools +set -ex +INSTALLTYPE="PKG" -set -e - -. "$(dirname "$0")"/../common/unix/DownloadURL.sh - -DownloadURL \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/d8f6c666d20a3d42e007ceec161a06651ad92ba331a24a3de62912edb129a522/install.sh \ - http://ci-files01-hki.ci.qt.io/input/mac/homebrew/d8f6c666d20a3d42e007ceec161a06651ad92ba331a24a3de62912edb129a522/install.sh \ - d8f6c666d20a3d42e007ceec161a06651ad92ba331a24a3de62912edb129a522 \ - /tmp/homebrew_install.sh - -DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw" -{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null -sudo chmod 755 /tmp/homebrew_install.sh -{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null -rm -f "/Users/qt/pw" - -# No need to manually do `brew update`, the homebrew installer script does it. -### brew update +BASEDIR=$(dirname "$0") +# Usage "$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE" "$HOMEBREW_VERSION" "$HOMEBREW_HASH" +# Specify HOMEBREW_VERSION and HOMEBREW_HASH only if defaults set in homebrew.sh are not suitable for this platform +"$BASEDIR/../common/macos/homebrew.sh" "$INSTALLTYPE"