Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xclogparser 0.2.40 #201480

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
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
65 changes: 60 additions & 5 deletions Formula/x/xclogparser.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Xclogparser < Formula
desc "Tool to parse the SLF serialization format used by Xcode"
homepage "https://github.com/MobileNativeFoundation/XCLogParser"
url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.39.tar.gz"
sha256 "b225891b94bbdb549ddbc9ffe838ad87f73ef7cc79934e3e23969bb1220eafd9"
url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.40.tar.gz"
sha256 "b8bd40342ab3918c00ccc174e929a05de2a3cd196dff9ae3ef3dc8a21e0413b7"
license "Apache-2.0"

bottle do
Expand All @@ -18,13 +18,35 @@ class Xclogparser < Formula
depends_on xcode: "13.0"

uses_from_macos "swift"
uses_from_macos "zlib"

# patch to use linuxbrew zlib, upstream pr ref, https://github.com/1024jp/GzipSwift/pull/71
on_linux do
patch :DATA
end

# version patch, upstream pr ref, https://github.com/MobileNativeFoundation/XCLogParser/pull/223
patch do
url "https://github.com/MobileNativeFoundation/XCLogParser/commit/430107e1e6ec9d54ddaa301d64596c7311f7c966.patch?full_index=1"
sha256 "5a4613af2ead387887e508032673d4fbb9afbf66fd919e9b16cf42b5b453218d"
end

def install
system "swift", "build", "-c", "release", "--disable-sandbox"
args = if OS.mac?
["--disable-sandbox"]
else
["--static-swift-stdlib"]
end
system "swift", "build", *args, "--configuration", "release"
bin.install ".build/release/xclogparser"
end

test do
assert_match version.to_s, shell_output("#{bin}/xclogparser version")

# skip tests for linux build and sequoia macos build due to the test file issue
return if OS.linux? || (OS.mac? && MacOS.version == :sequoia)

resource "homebrew-test_log" do
url "https://github.com/chenrui333/github-action-test/releases/download/2024.04.14/test.xcactivitylog"
sha256 "3ac25e3160e867cc2f4bdeb06043ff951d8f54418d877a9dd7ad858c09cfa017"
Expand All @@ -33,7 +55,40 @@ def install
resource("homebrew-test_log").stage(testpath)
output = shell_output("#{bin}/xclogparser dump --file #{testpath}/test.xcactivitylog")
assert_match "Target 'helloworldTests' in project 'helloworld'", output

assert_match version.to_s, shell_output("#{bin}/xclogparser version")
end
end

__END__
diff --git a/Package.resolved b/Package.resolved
index 900fb44..cc4b2bc 100644
--- a/Package.resolved
+++ b/Package.resolved
@@ -11,12 +11,12 @@
}
},
{
- "package": "Gzip",
+ "package": "GzipSwift",
"repositoryURL": "https://github.com/1024jp/GzipSwift",
"state": {
"branch": null,
- "revision": "ba0b6cb51cc6202f896e469b87d2889a46b10d1b",
- "version": "5.1.1"
+ "revision": "29f62534648e6334678b6d7b14c6f7e618715944",
+ "version": null
}
},
{
diff --git a/Package.swift b/Package.swift
index 98f46e7..068b3db 100644
--- a/Package.swift
+++ b/Package.swift
@@ -11,7 +11,7 @@ let package = Package(
.library(name: "XCLogParser", targets: ["XCLogParser"])
],
dependencies: [
- .package(url: "https://github.com/1024jp/GzipSwift", from: "5.1.0"),
+ .package(url: "https://github.com/1024jp/GzipSwift", revision: "29f62534648e6334678b6d7b14c6f7e618715944"),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .exact("1.3.3")),
.package(url: "https://github.com/kylef/PathKit.git", from: "1.0.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.0"),
Loading