Skip to content

Commit 64c39bd

Browse files
committed
ci: Pin MacPorts version to 2.9.3.
Commit d01ce18 invented a new way to find the latest MacPorts version. By bad luck, a new beta release has just been published, and it seems to lack some packages we need. Go back to searching for this specific version for now. We still search with a pattern so that we can find the package for the running version of macOS, but for now we always look for 2.9.3. The code to do that had been anticipated already in a commented out line, I just didn't expect to have to use it so soon... Also include the whole MacPorts installation script in the cache key, so that changes to the script cause a fresh installation. This should make it a bit easier to reason about the effect of changes on cached state in github accounts using CI, when we make adjustments. Back-patch to 15, like d01ce18. Discussion: https://postgr.es/m/CA%2BhUKGLqJdv6RcwyZ_0H7khxtLTNJyuK%2BvDFzv3uwYbn8hKH6A%40mail.gmail.com
1 parent b8aa44f commit 64c39bd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.cirrus.tasks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,8 @@ task:
466466
# Include the OS major version in the cache key. If the OS image changes
467467
# to a different major version, we need to reinstall.
468468
sw_vers -productVersion | sed 's/\..*//'
469+
# Also start afresh if we change our MacPorts install script.
470+
md5 src/tools/ci/ci_macports_packages.sh
469471
reupload_on_changes: true
470472
setup_additional_packages_script: |
471473
sh src/tools/ci/ci_macports_packages.sh \

src/tools/ci/ci_macports_packages.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,10 @@ packages="$@"
1616
macos_major_version="` sw_vers -productVersion | sed 's/\..*//' `"
1717
echo "macOS major version: $macos_major_version"
1818

19-
# Scan the avialable MacPorts releases to find the latest one for the
20-
# running macOS release. By default we assume the first match is the most
21-
# recent MacPorts version but that can be changed below if it turns out to be
22-
# problematic or a particular MacPorts release turns out to be broken.
19+
# Scan the available MacPorts releases to find one that matches the running
20+
# macOS release.
2321
macports_release_list_url="https://api.github.com/repos/macports/macports-base/releases"
24-
macports_version_pattern=".*"
25-
#macports_version_pattern="2\.9\.3"
22+
macports_version_pattern="2\.9\.3"
2623
macports_url="$( curl -s $macports_release_list_url | grep "\"https://github.com/macports/macports-base/releases/download/v$macports_version_pattern/MacPorts-$macports_version_pattern-$macos_major_version-[A-Za-z]*\.pkg\"" | sed 's/.*: "//;s/".*//' | head -1 )"
2724
echo "MacPorts package URL: $macports_url"
2825

0 commit comments

Comments
 (0)