Skip to content

Commit 4e534b0

Browse files
committed
ensure release if we build with production
1 parent 5666481 commit 4e534b0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/commands/build.cr

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ module Shards
2525
private def build(target, options)
2626
Log.info { "Building: #{target.name}" }
2727

28-
args = [
29-
"build",
30-
"-o", File.join(Shards.bin_path, target.name),
31-
target.main,
32-
]
28+
args = ["build", "-o", File.join(Shards.bin_path, target.name)]
29+
args << "--release" if Shards.production
30+
args << target.main
31+
3332
options.each { |option| args << option }
3433
Log.debug { "crystal #{args.join(' ')}" }
3534

0 commit comments

Comments
 (0)