From 0fa7b5aa705c9c6926ee26503bdade01a2d98cdb Mon Sep 17 00:00:00 2001 From: Leandro Martinez Date: Thu, 11 Jul 2024 14:11:21 -0300 Subject: [PATCH] print TOML data in alphabetical order (with "julia" at the end) --- src/tag.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tag.jl b/src/tag.jl index c84f9ae..4d9dd0f 100644 --- a/src/tag.jl +++ b/src/tag.jl @@ -191,7 +191,7 @@ function tag_internal( pkg_toml_content["version"] = version_to_be_tagged open(pkg_project_toml_path, "w") do f - TOML.print(TOML_print_conversion, f, pkg_toml_content) + TOML.print(TOML_print_conversion, f, pkg_toml_content; sorted=true, by=key -> ifelse(key=="julia", "1", "0$key")) end project_as_it_should_be_tagged = Pkg.Types.read_project(pkg_project_toml_path) @@ -208,7 +208,7 @@ function tag_internal( pkg_toml_content["version"] = next_version open(pkg_project_toml_path, "w") do f - TOML.print(TOML_print_conversion, f, pkg_toml_content) + TOML.print(TOML_print_conversion, f, pkg_toml_content; sorted=true, by=key -> ifelse(key=="julia", "1", "0$key")) end LibGit2.add!(pkg_repo, splitdir(pkg_project_toml_path)[2])