Skip to content

Commit

Permalink
Attempt to require the installed prism
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Jun 4, 2024
1 parent df1eda2 commit 870709c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ jobs:
with:
ruby-version: head
bundler-cache: true
- run: bundle exec rake build
- run: bundle config --local frozen false
- run: bundle exec rake build:dev
- uses: actions/upload-artifact@v4
with:
name: gem-package
Expand Down
14 changes: 14 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,17 @@ Prism::Template::TEMPLATES.each do |filepath|
Prism::Template.render(t.name)
end
end

namespace :build do
task :dev_version_set do
filepath = File.expand_path("prism.gemspec", __dir__)
File.write(filepath, File.read(filepath).sub(/spec\.version = ".+?"/, %Q{spec.version = "9999.9.9"}))
end

task :dev_version_clear do
sh "git checkout -- prism.gemspec Gemfile.lock"
end

desc "Build a development version of the gem"
task dev: ["build:dev_version_set", "build", "build:dev_version_clear"]
end

0 comments on commit 870709c

Please sign in to comment.