kou commented on code in PR #38133:
URL: https://github.com/apache/arrow/pull/38133#discussion_r1369242501
##########
ci/scripts/swift_test.sh:
##########
@@ -19,13 +19,32 @@
set -ex
+cd /arrow/swift/swiftlint && tar -xzvf SwiftLint-0.53.0.tar.gz
+cd /arrow/swift/swiftlint && unzip -o SwiftLintBinary-macos.artifactbundle.zip
+cp /arrow/swift/swiftlint/SwiftLint-Package.swift
/arrow/swift/swiftlint/SwiftLint-0.53.0/Package.swift
+cd /arrow/swift/swiftlint/SwiftLint-0.53.0 && swift build
+cp /arrow/swift/swiftlint/SwiftLint-0.53.0/.build/debug/swiftlint /usr/bin
Review Comment:
@abandy Hmm. Could you try the following? Or can I push it to this branch
directly?
```diff
diff --git a/ci/docker/ubuntu-swift.dockerfile
b/ci/docker/ubuntu-swift.dockerfile
index 4b9cb7b2b..4789c9188 100644
--- a/ci/docker/ubuntu-swift.dockerfile
+++ b/ci/docker/ubuntu-swift.dockerfile
@@ -17,9 +17,18 @@
FROM swift:5.7.3
-# Install golang
+# Go is needed for generating test data
RUN apt-get update -y -q && \
apt-get install -y -q --no-install-recommends \
golang-go \
- unzip && \
- apt-get clean
\ No newline at end of file
+ unzip \
+ wget && \
+ apt-get clean
+
+ARG swift_lint=0.53.0
+RUN wget
https://github.com/realm/SwiftLint/releases/download/${swift_lint}/swiftlint_linux.zip
&& \
+ unzip swiftlint_linux.zip && \
+ mv swiftlint /usr/local/bin/ && \
+ mkdir -p /usr/local/share/doc/swiftlint/ && \
+ mv LICENSE /usr/local/share/doc/swiftlint/ && \
+ rm -rf swiftlint_linux.zip
diff --git a/ci/scripts/swift_test.sh b/ci/scripts/swift_test.sh
index c2d221132..b6cff9819 100755
--- a/ci/scripts/swift_test.sh
+++ b/ci/scripts/swift_test.sh
@@ -21,11 +21,6 @@ set -ex
cp ${1}/swift/swiftlint/.swiftlint.yml ${1}/swift/Arrow
cp ${1}/swift/swiftlint/.swiftlint.yml ${1}/swift/ArrowFlight
-cd ${1}/swift/swiftlint && tar -xzvf SwiftLint-0.53.0.tar.gz
-cd ${1}/swift/swiftlint && unzip -o SwiftLintBinary-macos.artifactbundle.zip
-cp ${1}/swift/swiftlint/SwiftLint-Package.swift
${1}/swift/swiftlint/SwiftLint-0.53.0/Package.swift
-cd ${1}/swift/swiftlint/SwiftLint-0.53.0 && swift build
-cp ${1}/swift/swiftlint/SwiftLint-0.53.0/.build/debug/swiftlint /usr/bin
data_gen_dir=${1}/swift/data-generator/swift-datagen
export GOPATH=/
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]