Skip to content
Snippets Groups Projects
Unverified Commit 519c3392 authored by Dario Vladovic's avatar Dario Vladovic
Browse files

create: add --crystal option

parent adbc50f1
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,8 @@ module Homebrew
description: "Create a basic template for an Autotools-style build."
switch "--cmake",
description: "Create a basic template for a CMake-style build."
switch "--crystal",
description: "Create a basic template for a Crystal build."
switch "--go",
description: "Create a basic template for a Go build."
switch "--meson",
......@@ -50,7 +52,7 @@ module Homebrew
switch :force
switch :verbose
switch :debug
conflicts "--autotools", "--cmake", "--go", "--meson", "--perl", "--python", "--rust"
conflicts "--autotools", "--cmake", "--crystal", "--go", "--meson", "--perl", "--python", "--rust"
named 1
end
end
......@@ -82,6 +84,8 @@ module Homebrew
:autotools
elsif args.meson?
:meson
elsif args.crystal?
:crystal
elsif args.go?
:go
elsif args.perl?
......
......@@ -103,6 +103,8 @@ module Homebrew
<% if mode == :cmake %>
depends_on "cmake" => :build
<% elsif mode == :crystal %>
depends_on "crystal" => :build
<% elsif mode == :go %>
depends_on "go" => :build
<% elsif mode == :meson %>
......@@ -138,6 +140,9 @@ module Homebrew
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=\#{prefix}"
<% elsif mode == :crystal %>
system "shards", "build", "--release"
bin.install "bin/#{name}"
<% elsif mode == :go %>
system "go", "build", *std_go_args
<% elsif mode == :meson %>
......
......@@ -162,6 +162,7 @@ _brew_create() {
--HEAD
--autotools
--cmake
--crystal
--debug
--force
--go
......
......@@ -769,6 +769,8 @@ a simple example. For the complete API, see:
Create a basic template for an Autotools-style build.
* `--cmake`:
Create a basic template for a CMake-style build.
* `--crystal`:
Create a basic template for a Crystal build.
* `--go`:
Create a basic template for a Go build.
* `--meson`:
......
......@@ -999,6 +999,10 @@ Create a basic template for an Autotools\-style build\.
Create a basic template for a CMake\-style build\.
.
.TP
\fB\-\-crystal\fR
Create a basic template for a Crystal build\.
.
.TP
\fB\-\-go\fR
Create a basic template for a Go build\.
.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment