Skip to content

Commit

Permalink
fix(swiftlint) (#8052)
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Heider <jacob@pkgx.dev>
  • Loading branch information
waliid and jhheider authored Nov 29, 2024
1 parent 47aa6df commit 722117a
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions projects/github.com/realm/SwiftLint/package.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,39 @@
distributable:
url: https://github.com/realm/SwiftLint/archive/refs/tags/{{version}}.tar.gz
strip-components: 1
distributable: ~

versions:
github: realm/SwiftLint/releases/tags

warnings:
- vendored

platforms:
- darwin
- linux/x86-64

provides:
- bin/swiftlint

warnings:
- vendored
dependencies:
linux:
curl.se: 8
gnome.org/libxml2: 2

build:
working-directory: vendor
script: |
curl -Lfo swiftlint.zip "https://github.com/realm/SwiftLint/releases/download/{{version}}/portable_swiftlint.zip"
unzip -o swiftlint.zip
mkdir -p "{{prefix}}/bin"
mv swiftlint "{{prefix}}/bin"
dependencies:
curl.se: '*'
info-zip.org/unzip: '*'
working-directory: '{{prefix}}/bin'
script:
- run: curl -Lfo swiftlint.zip "https://github.com/realm/SwiftLint/releases/download/{{version}}/portable_swiftlint.zip"
if: darwin
- run: curl -Lfo swiftlint.zip "https://github.com/realm/SwiftLint/releases/download/{{version}}/swiftlint_linux.zip"
if: linux

- unzip -o swiftlint.zip
skip: fix-machos

provides:
- bin/swiftlint

test:
# MacOS 11 doesn't have the necessary library
- run: |
if ! test -f /usr/lib/swift/libswift_Concurrency.dylib; then
echo "warning: skipping tests because libswift_Concurrency.dylib is missing"
exit 0
fi
# we can't actually test swiftlint for linux, because it requires a newer glibc
# but it's vendored, so we're probably fine?
- run: test "$(swiftlint --version)" = {{version}}
if: darwin
- test "$(swiftlint --version)" = {{version}}

0 comments on commit 722117a

Please sign in to comment.