Last active
March 1, 2019 05:24
-
-
Save kawaz/75f96099b2f1957704b0499af05baf20 to your computer and use it in GitHub Desktop.
https://github.com/nodejs/Release/blob/master/schedule.json を用途別に使いやすく整形するスクリプト
This file contains 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
curl -sL https://raw.githubusercontent.com/nodejs/Release/master/schedule.json | jq --arg today "$(date -u +%Y-%m-%d)" ' | |
. as $a | keys | map({release:.}+$a[.]) | sort_by(.start) | reverse | | |
{ | |
pending: map(select(.start>$today)), | |
current: map(select(.start<=$today and .lts==null))[0:1], | |
active_lts: map(select(.lts and .lts<=$today and .maintenance>$today)), | |
maintenance_lts: map(select(.lts and .lts<=$today and .maintenance<=$today and .end>$today)), | |
end: map(select(.end<=$today)) | |
}' |
This file contains 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
{ | |
"pending": [ | |
{ | |
"release": "v12", | |
"start": "2019-04-23", | |
"lts": "2019-10-22", | |
"maintenance": "2021-04-01", | |
"end": "2022-04-01", | |
"codename": "" | |
} | |
], | |
"current": [ | |
{ | |
"release": "v11", | |
"start": "2018-10-23", | |
"maintenance": "2019-04-01", | |
"end": "2019-06-30" | |
} | |
], | |
"active_lts": [ | |
{ | |
"release": "v10", | |
"start": "2018-04-24", | |
"lts": "2018-10-30", | |
"maintenance": "2020-04-01", | |
"end": "2021-04-01", | |
"codename": "Dubnium" | |
} | |
], | |
"maintenance_lts": [ | |
{ | |
"release": "v8", | |
"start": "2017-05-30", | |
"lts": "2017-10-31", | |
"maintenance": "2019-01-01", | |
"end": "2019-12-31", | |
"codename": "Carbon" | |
}, | |
{ | |
"release": "v6", | |
"start": "2016-04-26", | |
"lts": "2016-10-18", | |
"maintenance": "2018-04-30", | |
"end": "2019-04-01", | |
"codename": "Boron" | |
} | |
], | |
"end": [ | |
{ | |
"release": "v9", | |
"start": "2017-10-01", | |
"maintenance": "2018-04-01", | |
"end": "2018-06-30" | |
}, | |
{ | |
"release": "v7", | |
"start": "2016-10-25", | |
"maintenance": "2017-04-30", | |
"end": "2017-06-30" | |
}, | |
{ | |
"release": "v5", | |
"start": "2015-10-29", | |
"maintenance": "2016-04-30", | |
"end": "2016-06-30" | |
}, | |
{ | |
"release": "v4", | |
"start": "2015-09-08", | |
"lts": "2015-10-12", | |
"maintenance": "2017-04-01", | |
"end": "2018-04-30", | |
"codename": "Argon" | |
}, | |
{ | |
"release": "v0.12", | |
"start": "2015-02-06", | |
"end": "2016-12-31" | |
}, | |
{ | |
"release": "v0.10", | |
"start": "2013-03-11", | |
"end": "2016-10-31" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment