Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/usr/local/buildpack/tools/v2/swift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function prepare_tool() {
}

function install_tool () {
local arch
local tool_path
local file
local SWIFT_PLATFORM
Expand Down Expand Up @@ -79,15 +80,21 @@ function install_tool () {
# shellcheck source=/dev/null
VERSION_ID=$(. /etc/os-release && echo "${VERSION_ID}")

# https://swift.org/builds/swift-5.3-release/ubuntu1804/swift-5.3-RELEASE/swift-5.3-RELEASE-ubuntu20.04.tar.gz
# https://download.swift.org/swift-5.7-release/ubuntu2204/swift-5.7-RELEASE/swift-5.7-RELEASE-ubuntu22.04.tar.gz
# https://download.swift.org/swift-5.7.3-release/ubuntu2204/swift-5.7.3-RELEASE/swift-5.7.3-RELEASE-ubuntu22.04.tar.gz
# https://download.swift.org/swift-5.7.3-release/ubuntu2204-aarch64/swift-5.7.3-RELEASE/swift-5.7.3-RELEASE-ubuntu22.04-aarch64.tar.gz
if [[ "${PATCH}" = "0" ]]; then
version=${MAJOR}.${MINOR}
fi

SWIFT_PLATFORM=ubuntu${VERSION_ID}
if [[ "${ARCHITECTURE}" = "aarch64" ]]; then
arch=-${ARCHITECTURE}
fi

SWIFT_PLATFORM=ubuntu${VERSION_ID}${arch}
SWIFT_BRANCH=swift-${version}-release
SWIFT_VER=swift-${version}-RELEASE
SWIFT_WEBROOT=https://swift.org/builds
SWIFT_WEBROOT=https://download.swift.org

SWIFT_WEBDIR="$SWIFT_WEBROOT/$SWIFT_BRANCH/$(echo "$SWIFT_PLATFORM" | tr -d .)"

Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN uname -p | tee | grep aarch64

RUN touch /.dummy

ARG IGNORED_TOOLS=erlang,elixir,flutter,php,composer,swift
ARG IGNORED_TOOLS=erlang,elixir,flutter,php,composer

RUN prepare-tool all

Expand Down