Skip to content
Merged
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
10 changes: 5 additions & 5 deletions utils/build-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ set -x
YEAR=$(date +"%Y")
MONTH=$(date +"%m")
DAY=$(date +"%d")
TOOLCHAIN_VERSION="swift-LOCAL-${YEAR}-${MONTH}-${DAY}-a"
TOOLCHAIN_VERSION="5.0.${YEAR}${MONTH}${DAY}"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: the toolchain version format was copied from Info.plist from macOS toolchains from https://swift.org/download.

The leading 5.0 component appears to refer to the current Swift version (which incidentally is no longer 5.0 for master HEAD).

I'm not sure how to make it programmatically refer to the current Swift version. Hardcoding it to 5.0 seems fine for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could generate this file from CMake. There is no way to do this currently. I think that this is reasonable.

TOOLCHAIN_NAME="swift-LOCAL-${YEAR}-${MONTH}-${DAY}-a"
DARWIN_TOOLCHAIN_VERSION="0.0.${YEAR}${MONTH}${DAY}"
ARCHIVE="${TOOLCHAIN_VERSION}-${OS_SUFFIX}.tar.gz"
SYM_ARCHIVE="${TOOLCHAIN_VERSION}-${OS_SUFFIX}-symbols.tar.gz"
ARCHIVE="${TOOLCHAIN_NAME}-${OS_SUFFIX}.tar.gz"
SYM_ARCHIVE="${TOOLCHAIN_NAME}-${OS_SUFFIX}-symbols.tar.gz"
BUNDLE_PREFIX=${BUNDLE_PREFIX:?Please specify a bundle prefix}
BUNDLE_IDENTIFIER="${BUNDLE_PREFIX}.${YEAR}${MONTH}${DAY}"
DISPLAY_NAME_SHORT="Local Swift Development Snapshot"
DISPLAY_NAME="${DISPLAY_NAME_SHORT} ${YEAR}-${MONTH}-${DAY}"
TOOLCHAIN_NAME="${TOOLCHAIN_VERSION}"

SWIFT_INSTALLABLE_PACKAGE="${RESULT_DIR}/${ARCHIVE}"
SWIFT_INSTALL_DIR="${RESULT_DIR}/swift-nightly-install"
Expand All @@ -126,5 +126,5 @@ DISTCC_FLAG="${DISTCC_FLAG}"
darwin_toolchain_display_name="${DISPLAY_NAME}" \
darwin_toolchain_display_name_short="${DISPLAY_NAME_SHORT}" \
darwin_toolchain_xctoolchain_name="${TOOLCHAIN_NAME}" \
darwin_toolchain_version="${DARWIN_TOOLCHAIN_VERSION}" \
darwin_toolchain_version="${TOOLCHAIN_VERSION}" \
darwin_toolchain_alias="Local"