Skip to content

Commit 01be900

Browse files
committed
Latest Bun installed by the CI defaults to text based lockfile
1 parent f556824 commit 01be900

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/generators/dockerfile_generator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def using_node?
511511

512512
def using_bun?
513513
return @using_bun if @using_bun != nil
514-
@using_bun = File.exist?("bun.config.js") || File.exist?("bun.lockb") || File.exist?("bun.lock")
514+
@using_bun = File.exist?("bun.config.js") || File.exist?("bun.lock")
515515
end
516516

517517
def references_ruby_version_file?
@@ -1255,7 +1255,7 @@ def api_client_files
12551255
client = api_client_dir
12561256
return unless client
12571257

1258-
Dir["#{client}/{package.json,package-lock.json,yarn.lock,bun.lockb,bun.lock}"]
1258+
Dir["#{client}/{package.json,package-lock.json,yarn.lock,bun.lock}"]
12591259
end
12601260

12611261
def dbprep_command

lib/generators/templates/Dockerfile.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ FROM base AS <%= parallel? ? 'pre' : '' %>build
7070
FROM prebuild AS <% if using_bun? %>bun<% else %>node<% end %>
7171

7272
<% end -%>
73-
<% if using_bun? and (!using_execjs? || File.exist?('bun.lockb') || File.exist?('bun.lock')) -%>
73+
<% if using_bun? and (!using_execjs? || File.exist?('bun.lock')) -%>
7474
<%= render partial: 'install_node', locals: {bun_version: using_execjs? ? nil : bun_version} %>
7575

7676
<% elsif using_node? and (!using_execjs? || File.exist?('yarn.lock')) -%>
7777
<%= render partial: 'install_node', locals: {node_version: using_execjs? ? nil : node_version, yarn_version: File.exist?('yarn.lock') ? yarn_version : nil} %>
7878

7979
<% end -%>
8080
<% if parallel? -%>
81-
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(package.json yarn.lock bun.lockb bun.lock)]} %>
81+
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(package.json yarn.lock bun.lock)]} %>
8282

8383

8484
FROM prebuild AS build
@@ -149,7 +149,7 @@ ENV PATH=/usr/local/node/bin:$PATH
149149
<% end -%>
150150

151151
<% elsif using_node? || using_bun? -%>
152-
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(.npmrc .yarnrc package.json package-lock.json yarn.lock bun.lockb bun.lock)]} %>
152+
<%= render partial: 'npm_install', locals: {sources: Dir[*%w(.npmrc .yarnrc package.json package-lock.json yarn.lock bun.lock)]} %>
153153

154154
<% end -%>
155155
# Copy application code

0 commit comments

Comments
 (0)