mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-22 04:30:43 +00:00
As outlined in a [Swift forums post in November ’21](https://forums.swift.org/t/swiftnio-swift-version-support/53232), SwiftNIO will only support the latest non-patch Swift release and the 2 immediately prior non-patch versions. - drop support for Swift 5.2 and 5.3. - update CI for Swift 5.4 to run on bionic instead of focal to ensure that we still test bionic.
55 lines
1.5 KiB
Bash
Executable File
55 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
##===----------------------------------------------------------------------===##
|
|
##
|
|
## This source file is part of the SwiftNIO open source project
|
|
##
|
|
## Copyright (c) 2017-2020 Apple Inc. and the SwiftNIO project authors
|
|
## Licensed under Apache License v2.0
|
|
##
|
|
## See LICENSE.txt for license information
|
|
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
##
|
|
## SPDX-License-Identifier: Apache-2.0
|
|
##
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
set -eu
|
|
|
|
function usage() {
|
|
echo >&2 "Usage: $0 REPO-GITHUB-URL NEW-VERSION OLD-VERSIONS..."
|
|
echo >&2
|
|
echo >&2 "This script requires a Swift 5.6+ toolchain."
|
|
echo >&2
|
|
echo >&2 "Examples:"
|
|
echo >&2
|
|
echo >&2 "Check between main and tag 2.1.1 of swift-nio:"
|
|
echo >&2 " $0 https://github.com/apple/swift-nio main 2.1.1"
|
|
echo >&2
|
|
echo >&2 "Check between HEAD and commit 64cf63d7 using the provided toolchain:"
|
|
echo >&2 " xcrun --toolchain org.swift.5120190702a $0 ../some-local-repo HEAD 64cf63d7"
|
|
}
|
|
|
|
if [[ $# -lt 3 ]]; then
|
|
usage
|
|
exit 1
|
|
fi
|
|
|
|
tmpdir=$(mktemp -d /tmp/.check-api_XXXXXX)
|
|
repo_url=$1
|
|
new_tag=$2
|
|
shift 2
|
|
|
|
repodir="$tmpdir/repo"
|
|
git clone "$repo_url" "$repodir"
|
|
git -C "$repodir" fetch -q origin '+refs/pull/*:refs/remotes/origin/pr/*'
|
|
cd "$repodir"
|
|
git checkout -q "$new_tag"
|
|
|
|
for old_tag in "$@"; do
|
|
echo "Checking public API breakages from $old_tag to $new_tag"
|
|
|
|
swift package diagnose-api-breaking-changes "$old_tag"
|
|
done
|
|
|
|
echo done
|