Skip to content

Commit

Permalink
Use bundler's binstub for bt shortcut (#887)
Browse files Browse the repository at this point in the history
* Update nokolexbor

Fix build didn't work on macOS ARM

* Create bt shortcut by binstubs

---------

Co-authored-by: Erick Guan <[email protected]>
  • Loading branch information
erickguan and erickguan authored Apr 28, 2024
1 parent 24b39fa commit 490d9e6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix: Lock Liquid to version < 5.5 (unresolved data leakage and generation errors otherwise)
- Fix: esbuild file endings from previous release
- Use bundler binstubs to create `bin/bt` shortcut instead of by `cp`

## [1.3.3] - 2024-03-16

Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ GEM
racc (~> 1.4)
nokogiri (1.16.4-x86_64-linux)
racc (~> 1.4)
nokolexbor (0.5.3)
nokolexbor (0.5.3-arm64-darwin)
nokolexbor (0.5.3-x86_64-darwin)
nokolexbor (0.5.3-x86_64-linux)
nokolexbor (0.5.4)
nokolexbor (0.5.4-arm64-darwin)
nokolexbor (0.5.4-x86_64-darwin)
nokolexbor (0.5.4-x86_64-linux)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
Expand Down
6 changes: 6 additions & 0 deletions bridgetown-core/bin/bt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# `bt` is a shortcut to `bridgetown`

load File.join(File.dirname(__FILE__), 'bridgetown')
2 changes: 1 addition & 1 deletion bridgetown-core/bridgetown-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |s|
s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r!^(benchmark|features|script|test)/!)
end
s.executables = ["bridgetown"]
s.executables = ["bridgetown", "bt"] # `bt` is a shortcut to `bridgetown` command
s.bindir = "bin"
s.require_paths = ["lib"]

Expand Down
2 changes: 1 addition & 1 deletion bridgetown-core/lib/bridgetown-core/commands/new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def bundle_install(path)
Bridgetown.with_unbundled_env do
inside(path) do
run "bundle install", abort_on_failure: true
# create binstubs to `bin/bridgetown` and `bin/bt`
run "bundle binstubs bridgetown-core"
run "cp bin/bridgetown bin/bt"
end
end
end
Expand Down

0 comments on commit 490d9e6

Please sign in to comment.