Skip to content

Commit

Permalink
added a script to build and test the gem
Browse files Browse the repository at this point in the history
  • Loading branch information
masukomi committed Jul 16, 2024
1 parent b02298c commit 50834fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mongodb_meilisearch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[spec/ features/ .git .lefthook/ .github/])
(File.expand_path(f) == __FILE__) || f.start_with?(*%w[spec/ features/ .git .lefthook/ .github/ tools/])
end
end
# spec.bindir = "exe"
Expand Down
10 changes: 10 additions & 0 deletions tools/build_and_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

where=$(rake build | sed -e "s/.*built to //" -e "s/\.$//" )
if [ $? -eq 0 ]; then
echo "installing $where"
gem install $where
else
echo "problems encountered building"
echo "run: rake build"
fi

0 comments on commit 50834fa

Please sign in to comment.