General icon indicating copy to clipboard operation
General copied to clipboard

Delete empty `Deps.toml`, `Compat.toml`, `WeakDeps.toml`, and `WeakCompat.toml` files

Open DilumAluthge opened this issue 1 year ago • 5 comments

Do not merge this PR until the following PR has been merged:

  • [x] https://github.com/JuliaRegistries/RegistryCI.jl/pull/495
Generated by the following script: (click to expand)
mktempdir() do tmp_dir
    cd(tmp_dir) do
        run(`git clone [email protected]:JuliaRegistries/General.git`)
        cd("General") do
            my_branch = "dpa/delete-empty-toml-files"
            commit_msg = "Delete empty `Deps.toml`, `Compat.toml`, `WeakDeps.toml`, and `WeakCompat.toml` files"
            run(`git checkout -B $(my_branch)`)
            for (root, dirs, files) in walkdir(".")
                for file in files
                    path = joinpath(root, file)
                    if file in ("Deps.toml", "Compat.toml", "WeakDeps.toml", "WeakCompat.toml")
                        if isempty(strip(read(path, String)))
                            rm(path)
                        end
                    end
                end
            end
            run(`git add -A`)
            run(`git commit -m "$(commit_msg)"`)
            run(`git push -f origin $(my_branch)`)
        end
    end
end

DilumAluthge avatar Feb 17 '23 05:02 DilumAluthge