Skip to content

Commit

Permalink
🧹 Specify knapsack required branch
Browse files Browse the repository at this point in the history
See inline documentation regarding purpose and intent of the hard-coded
branch logic.
  • Loading branch information
jeremyf committed Jan 10, 2024
1 parent b34f43b commit cde504f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
20 changes: 15 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,21 @@ gem 'webmock', group: %i[test]
# and place overrides, themes and deployment code.
#
# When you use a knapsack for Hyku development, which we recommend, you'll want to ensure that your
# local knapsack repository has a `main` branch (which it should by default). Due to some
# tomfoolery, of knapsack, the branch name (e.g. `main`) must be checked out locally in the knapsack
# environment that you use to build Docker.
# local knapsack repository has a `'required_for_knapsack_instances'` branch (which it should by
# default). Due to some tomfoolery, of knapsack, the branch name
# (e.g. `required_for_knapsack_instances`) must be checked out locally in the knapsack environment
# that you use to build Docker.
#
# tl;dr - Have a local main branch on your knapsack repository
gem 'hyku_knapsack', github: 'samvera-labs/hyku_knapsack', branch: 'main'
# Why not use `main`? We need a stable SHA for building HykuKnapsack prime
# (e.g. samvera-labs/hyku_knapsack). Why the stable SHA? Because when we bundle a knapsack, the
# Hyku submodule uses the SHA of the locally checked out branch specified in the gem spec. Which
# can create a chicken and egg issue; namely I need to update Hyku with a new SHA for Knapsack, but
# to update Knapsack's submodule reference to Hyku, I need a new SHA for knapsack. Thus, I can never
# use a "regular branch". Instead we need to use a separate more stable for Knapsack.
#
# Thus the hopefully descriptive `required_for_knapsack_instances`.
#
# tl;dr - Have a local `required_for_knapsack_instances` branch on your knapsack repository
gem 'hyku_knapsack', github: 'samvera-labs/hyku_knapsack', branch: 'required_for_knapsack_instances'

# rubocop:enable Layout/LineLength
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ GIT

GIT
remote: https://github.com/samvera-labs/hyku_knapsack.git
revision: 418a390fad222120a36e29271ba6c80ff91b358c
branch: main
revision: 5a7c54cace96881a3963ab2fd881ca6ea3f57372
branch: required_for_knapsack_instances
specs:
hyku_knapsack (0.0.1)
rails (>= 5.2.0)
Expand Down

0 comments on commit cde504f

Please sign in to comment.