diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-29 10:40:39 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-29 10:40:39 +0900 |
commit | ecd42cfe39c13636defd4138cdbe92c709978812 (patch) | |
tree | 4c26160048143e42866bf687edb7a55855ba5fee /tool | |
parent | 8189a1400ebb0d9464203a6f70957254edc45faf (diff) |
Skip added tool files
Get rid of accidents like 966f0d91e2a86fa1347cdafbe1af47e7350aa4ca.
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/sync_default_gems.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tool/sync_default_gems.rb b/tool/sync_default_gems.rb index 467063b968..4bd6bf6802 100755 --- a/tool/sync_default_gems.rb +++ b/tool/sync_default_gems.rb @@ -435,7 +435,8 @@ module SyncDefaultGems |\.git.* |[A-Z]\w+file |COPYING - |rakelib\/.* + |\Arakelib\/.* + |\Atest\/lib\/.* )\z/mx def message_filter(repo, sha, input: ARGF) @@ -583,8 +584,9 @@ module SyncDefaultGems next end - tools = pipe_readlines(%W"git diff --name-only -z HEAD~..HEAD -- test/lib/ tool/") + tools = pipe_readlines(%W"git diff --name-only -z HEAD~..HEAD -- test/lib/ tool/ rakelib/") unless tools.empty? + system(*%W"git rm --", *tools) system(*%W"git checkout HEAD~ --", *tools) if system(*%W"git diff --quiet HEAD~") `git reset HEAD~ --` && `git checkout .` && `git clean -fd` |