Skip to content

Commit

Permalink
fix(compiler): use production flag to skip install of dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
caspiano committed Jan 29, 2021
1 parent 17ef666 commit ee9ba82
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.0
shards:
action-controller:
git: https://github.com/spider-gazelle/action-controller.git
version: 3.5.1
version: 3.5.2

ameba:
git: https://github.com/crystal-ameba/ameba.git
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: placeos-compiler
version: 3.3.0
version: 3.3.1

dependencies:
placeos-driver:
Expand Down
1 change: 0 additions & 1 deletion spec/compiler_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module PlaceOS
it "should clone and install a repository" do
Compiler.clone_and_install("rwlock", "https://github.com/spider-gazelle/readers-writer")
File.file?(File.expand_path("./repositories/rwlock/shard.yml")).should be_true
File.directory?(File.expand_path("./repositories/rwlock/bin")).should be_true
end

it "should clone and install a repository branch" do
Expand Down
4 changes: 2 additions & 2 deletions src/placeos-compiler/compiler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module PlaceOS::Compiler
# operations in a single lock. i.e. clone + shards install
GitCommands.repo_lock(repo_dir).write do
# First check if the dependencies are satisfied
result = ExecFrom.exec_from(repo_dir, "shards", {"--no-color", "check"})
result = ExecFrom.exec_from(repo_dir, "shards", {"--no-color", "check", "--production"})
check_output = result[:output].to_s
check_exit_code = result[:exit_code]

Expand All @@ -139,7 +139,7 @@ module PlaceOS::Compiler
}
else
# Otherwise install shards
result = ExecFrom.exec_from(repo_dir, "shards", {"--no-color", "install"})
result = ExecFrom.exec_from(repo_dir, "shards", {"--no-color", "install", "--production"})
{
exit_status: result[:exit_code],
output: result[:output].to_s,
Expand Down

0 comments on commit ee9ba82

Please sign in to comment.