|
|
@@ -37,7 +37,6 @@ PROTOBUF_VERSION=3.9.1
|
|
|
# We need this to build gRPC C++ for the interop test server(s).
|
|
|
BAZEL_VERSION=0.28.1
|
|
|
GRPC_VERSION=1.23.0
|
|
|
-SWIFTFORMAT_VERSION=0.44.13
|
|
|
|
|
|
info() {
|
|
|
printf '\033[0;34m%s\033[0m\n' "$1"
|
|
|
@@ -183,20 +182,21 @@ function install_swiftformat() {
|
|
|
echo -en 'travis_fold:start:install.swiftformat\\r'
|
|
|
info "Installing swiftformat"
|
|
|
|
|
|
- if [ ! -f "$BIN_CACHE/swiftformat-$SWIFTFORMAT_VERSION" ]; then
|
|
|
- git clone -b "$SWIFTFORMAT_VERSION" --depth 1 "https://github.com/nicklockwood/SwiftFormat"
|
|
|
+ git clone --depth 1 "https://github.com/nicklockwood/SwiftFormat"
|
|
|
+ cd SwiftFormat
|
|
|
+ version=$(git rev-parse HEAD)
|
|
|
|
|
|
+ if [ ! -f "$BIN_CACHE/swiftformat-$version" ]; then
|
|
|
info "Building swiftformat"
|
|
|
- cd SwiftFormat
|
|
|
swift build --product swiftformat
|
|
|
|
|
|
- cp "$(swift build --show-bin-path)/swiftformat" "$BIN_CACHE/swiftformat-$SWIFTFORMAT_VERSION"
|
|
|
+ cp "$(swift build --show-bin-path)/swiftformat" "$BIN_CACHE/swiftformat-$version"
|
|
|
else
|
|
|
- info "Skipping download and build of SwiftFormat, using cached binaries"
|
|
|
+ info "Skipping build of SwiftFormat, using cached binaries"
|
|
|
fi
|
|
|
|
|
|
# We should have cached swiftformat now, copy it to $HOME/local/bin
|
|
|
- cp "$BIN_CACHE/swiftformat-$SWIFTFORMAT_VERSION" "$HOME"/local/bin/swiftformat
|
|
|
+ cp "$BIN_CACHE/swiftformat-$version" "$HOME"/local/bin/swiftformat
|
|
|
|
|
|
success "Installed swiftformat"
|
|
|
echo -en 'travis_fold:end:install.swiftformat\\r'
|