Skip to content

Commit

Permalink
Update Swift-format version
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeLyon committed Mar 14, 2024
1 parent 6555ba4 commit ec7217f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .devcontainer/default/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
FROM swift:5.10-jammy

ENV SWIFT_FORMAT_VERSION=510.0.0

# Install swift-format
RUN \
git clone https://github.com/apple/swift-format \
-b 509.0.0 /opt/swift-format \
-b $SWIFT_FORMAT_VERSION /opt/swift-format \
&& cd /opt/swift-format \
&& sed -i'' \
"s/print(\".*\")/print(\"$SWIFT_FORMAT_VERSION\")/" \
Sources/swift-format/VersionOptions.swift \
# Compile in debug because compiling in release is very slow
&& swift build -c debug \
&& cp -f .build/debug/swift-format /usr/bin/swift-format \
Expand Down

0 comments on commit ec7217f

Please sign in to comment.