Closed orta closed 5 years ago
OK, that's confusing, why does the danger-swift repo allow a root Dangerfile, but not your repo? It seems to non-optional so I'll add support for an implicit danger/Dangerfile.swift
also
@orta I think that's because Danger-Swift uses Swift 4, while Marathon uses Swift 3.1. We should be able to use Swift 4 for Marathon as well. BuddyBuild already supports it, and it looks like swiftenv
does too now (for Travis/Linux), using the 4.0-dev
identifier (see https://github.com/kylef/swiftenv/releases/tag/1.3.0).
Him, interesting that fails, might need to run on a Mac with XC9 (this was my initial implementation in travis) - will test that
@orta Need any assistance with this one? I'd be happy to help - will have some free time this weekend 😄
Ah yeah, it's mostly about getting swift 4 to work on linux
Copying https://github.com/vapor/vapor/blob/master/circle.yml may help 👍
I got 5m, will try it - it's on a branch so you can push too
This is now much closer ( as I got the builds etc working on Swift 4 correctly inside the danger repo) the new issue lies inside marathon I think: https://travis-ci.org/JohnSundell/Marathon/builds/273308920#L657
$ ./.build/debug/Marathon install danger/danger-swift
🏃 Cloning <CFURL 0x1b05a40 [0x7f3163982870]>{string = https://github.com/danger/danger-swift.git, encoding = 134217984, base = (null)}...
Compiling script...
Installing binary...
💥 Failed to install script
👉 Make sure that you have write permissions to the path '/usr/local/bin/danger-swift' and that all parent folders exist
May be travis related, works fine locally.
Finally had some time to take a look at this in more detail. Looks like the problem actually is that Travis doesn't allow us to install Danger into /usr/local/bin
. Looking at how SwiftENV does this (https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh), it installs it at a local path then adds it to the current $PATH
to make it directly executable. Maybe we can try something similar here?
No worries, you were at NSSpain, which IMO, is a great use of your time 🍡
Yeah, that does sound like a good path to me. This should probably only happen if there's an ENV var of "CI"
set though.
Thought about this last night, could check first if user has write access to /usr/local/bin/
- then if not, trying every separate folder inside ENV["PATH"]
Builds on #125
Figured this was a good as an integration case as I can think of. Adds Danger Swift to the travis file, I know it's supported in buddy build, but I'm less sure how to check how all that works.