MobileNativeFoundation / XCLogParser

Tool to parse Xcode and xcodebuild logs stored in the xcactivitylog format
Apache License 2.0
1.73k stars 120 forks source link

[Question] What steps should I do after adding SPM dependency? #94

Closed AyaAkl25 closed 4 years ago

AyaAkl25 commented 4 years ago

Hey In the documentation when installation you say: simply use the Swift Package Manager commands directly. I already did that but my problem was trying to run xclogparse on CI (Bamboo). How can I make that the executable is there on agent without adding it manually but with Swift Package, is it doable? Thanks! P.S: I don't want to use Homebrew :)

BalestraPatrick commented 4 years ago

Hey! There are many ways to do this.

You could for example have a script that clones this repo and runs rake install to make sure the binary is installed on your agents. I wouldn't really recommend this though, since it'll pollute your builds agents with binaries.

My advice would be to compile each version as a binary (or even easier, download one of our binaries https://github.com/spotify/XCLogParser/releases) and make it available as part of your build. You probably have other tooling dependencies, so you could download it directly from GitHub and run it or host it internally and download it on every build and run it (this is currently our solution for all Spotify apps).

You could also use swift run if you really want to stick with SPM. Clone this repo somewhere on the machine and then run swift run and pass the correct arguments.

AyaAkl25 commented 4 years ago

@BalestraPatrick Thank you so much. I went with your advice and it worked and now I am using the binary to download it every build and run it. Thank you again :)