Cleanup cache after `bundle install`
未關閉
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 990
- 分支
- 369
- 平均合併
- 18 分鐘
- 30 天內合併 PR
- 3
描述
Hi, I noticed that the cache size is double what all gems in my project weigh. It seems like it's due to ${BUNDLE_PATH}/ruby/*/cache/*.gem files. But I don't think we need them after bundle install is finished. Or am I missing something?
I was thinking about adding a config param like prune-bundle-cache: true that would run rm -rf ${BUNDLE_PATH}/ruby/*/cache after bundle install
Rails already does it https://github.com/rails/rails/blob/9e9f80778abb38b8d884d456594d6b6fa683c773/railties/lib/rails/generators/rails/app/templates/Dockerfile.tt#L57
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
WDYT?
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
該 issue 未指定檔案或測試;先追蹤 setup-ruby 的 action 設定與 bundle install 的安裝流程。確定應將選擇性啟用的快取清理設定放在哪裡,然後驗證啟用該設定的安裝會刪除指定的快取路徑,同時預設行為維持不變。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, ruby
- 領域
- ci-cd, devops
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100