This repository was archived by the owner on Aug 24, 2024. It is now read-only.
Mark latest directory as Latest#89
Open
jolheiser wants to merge 1 commit intotechknowlogick:caddy-v1from
Open
Conversation
Owner
|
Thanks for PR :) I'm not sure this is where this should be, as looking at the test output {
"Path": "/",
"Folders": [
"1.1.0",
"1.1",
"1.10.0-rc1",
"1.10.0",
"1.10",
"1.11.0",
"1.2.0-dev",
"1.2.0",
"1",
"one"
],
"Files": {
"main.txt": {
"Bytes": 12,
"Date": "2021-02-05T19:19:50.932Z"
},
"second.txt": {
"Bytes": 14,
"Date": "2021-02-05T19:19:50.952Z"
}
},
"RenderedDirs": [
{
"Name": "1.11.0",
"Icon": "current",
"Description": "Current Release 1.11.0",
"Class": "current",
"Latest": true
},
{
"Name": "1.10.0",
"Icon": "release",
"Description": "Previous Release 1.10.0",
"Class": "",
"Latest": false
},
{
"Name": "1.10",
"Icon": "working",
"Description": "Development branch for 1.10",
"Class": "",
"Latest": true
},
{
"Name": "1.10.0-rc1",
"Icon": "working",
"Description": "Release Candidate rc1 for 1.10.0",
"Class": "",
"Latest": true
},
{
"Name": "1.2.0",
"Icon": "release",
"Description": "Previous Release 1.2.0",
"Class": "",
"Latest": false
},
{
"Name": "1.2.0-dev",
"Icon": "working",
"Description": "Development branch for 1.2.0",
"Class": "",
"Latest": true
},
{
"Name": "1.1.0",
"Icon": "release",
"Description": "Previous Release 1.1.0",
"Class": "",
"Latest": false
},
{
"Name": "1.1",
"Icon": "older",
"Description": "Maintenance branch for 1.1",
"Class": "",
"Latest": false
},
{
"Name": "1",
"Icon": "working",
"Description": "Development branch for 1",
"Class": "",
"Latest": true
},
{
"Name": "one",
"Icon": "folder",
"Description": "",
"Class": "",
"Latest": false
}
],
"RenderedFiles": [
{
"Name": "main.txt",
"Icon": "file",
"Description": "",
"Class": "",
"Bytes": 12,
"Date": "2021-02-05T19:19:50.932Z"
},
{
"Name": "second.txt",
"Icon": "file",
"Description": "",
"Class": "",
"Bytes": 14,
"Date": "2021-02-05T19:19:50.952Z"
}
]
} |
Author
|
Yeah....this is tricky because it seems that some of this only applies to customized rendering. Under semver sorting the first item in the slice would be latest, but I'm not sure what to do if semver sorting is turned off. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I haven't have a chance to test yet, wanted to make a PR while it was fresh in my head.