sourcedocs 0.5.1 (new formula)
Closes #32548. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
fbe97172be
commit
a156be2b72
1 changed files with 32 additions and 0 deletions
32
Formula/sourcedocs.rb
Normal file
32
Formula/sourcedocs.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
class Sourcedocs < Formula
|
||||
desc "Generate Markdown files from inline source code documentation"
|
||||
homepage "https://github.com/eneko/SourceDocs"
|
||||
url "https://github.com/eneko/SourceDocs/archive/0.5.1.tar.gz"
|
||||
sha256 "3c2e2de695d49dbdd5acb49f8876042bdc97e8d6b95584d3ef6b592b8f10affc"
|
||||
|
||||
depends_on :xcode => ["9.3", :build, :test]
|
||||
|
||||
def install
|
||||
system "swift", "build", "--disable-sandbox", "-c", "release", "-Xswiftc", "-static-stdlib"
|
||||
bin.install ".build/release/sourcedocs"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "SourceDocs v#{version}", shell_output("#{bin}/sourcedocs version")
|
||||
|
||||
# There are some issues with SourceKitten running in sandbox mode in Mojave
|
||||
# The following test has been disabled on Mojave until that issue is resolved
|
||||
# - https://github.com/Homebrew/homebrew/pull/50211
|
||||
# - https://github.com/Homebrew/homebrew-core/pull/32548
|
||||
if MacOS.version < "10.14"
|
||||
mkdir "foo" do
|
||||
system "swift", "package", "init"
|
||||
system "swift", "build", "--disable-sandbox"
|
||||
system "#{bin}/sourcedocs", "generate",
|
||||
"--spm-module", "foo",
|
||||
"--output-folder", testpath/"Documentation/Reference"
|
||||
assert_predicate testpath/"Documentation/Reference/README.md", :exist?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue