Skip to content

Commit

Permalink
Fix Mjollnir gem build and install
Browse files Browse the repository at this point in the history
  • Loading branch information
S-H-GAMELINKS committed Aug 15, 2024
1 parent 54d2718 commit 880014c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ jobs:
- name: Run tests
run: ~/.rbenv/shims/bundle exec rake test

- name: Run Mjollnir gem build
run: ~/.rbenv/shims/bundle exec rake build

- name: Run Mjollnir gem install
run: ~/.rbenv/shims/bundle exec rake install

5 changes: 4 additions & 1 deletion mjollnir.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ Gem::Specification.new do |spec|
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
gemspec = File.basename(__FILE__)
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) ||
f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
end
end
files << 'ext/mjollnir/parse.c'
files << 'ext/mjollnir/parse.h'
spec.files = files
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']
Expand Down

0 comments on commit 880014c

Please sign in to comment.