Uploaded image for project: 'Jenkins Website'
  1. Jenkins Website
  2. WEBSITE-276

Ibeams should sort files naturally in sections_from

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Right now, files are sorted lexicographically, which leads to 2.19 < 2.32 < 2.7:

      https://jenkins.io/doc/upgrade-guide/

      My suggestion for https://github.com/jenkins-infra/awestruct-ibeams/blob/008074d51e451b1f91171bbf34a72acb397ba056/lib/awestruct/ibeams/asciidoc_sections.rb#L28 is the following:

              files = Dir.glob(File.join(directory, "*.{ad,adoc}"))
      
              Naturally.sort(files).each do |adoc|

      With https://rubygems.org/gems/naturally

      This results in a much nicer (although ascending) order.

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -

          R. Tyler Croy https://jenkins.io/doc/pipeline/steps/ is now in reverse alphabetical order. The reversing needs to be done on the upgrade-guide, not here.

          Show
          danielbeck Daniel Beck added a comment - R. Tyler Croy https://jenkins.io/doc/pipeline/steps/ is now in reverse alphabetical order. The reversing needs to be done on the upgrade-guide, not here.
          Hide
          rtyler R. Tyler Croy added a comment -

          They're both using the same #sections_from code sigh

          I should have just closed this won't fix but I guess I'll waste some more time fixing up pretty sorts

          Show
          rtyler R. Tyler Croy added a comment - They're both using the same #sections_from code sigh I should have just closed this won't fix but I guess I'll waste some more time fixing up pretty sorts

            People

            Assignee:
            ibriskma Leonid Briskman
            Reporter:
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: