-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
This comment mentions parsing the static manifests page for acquiring an exact release date. While feasible, that resource seems to always be a week behind compared to the actual releases.
Parsing it is still possible though, and I do have something that mostly works hidden beneath
There are two dates that are relatively easy to acquire from there
- The date assigned to the channel release, in ISO-8601 format (YYYY-MM-DD, currently 2023-06-26)
- The date inside the manifest TOML, which lists when the last contributing commit was made as well as a version number (`version = "0.72.0-beta.4 (cfd3bbd8f 2023-06-08)"`, which seems to follow some semver logic wrt beta numbering being 0.x.y)
Assuming 1, it's as simple as
tmpvar=$(curl -s https://static.rust-lang.org/manifests.txt | grep -i beta | tail -1)
beta_date=${tmpvar:26:10}2 becomes slightly more complex, since it requires grabbing whatever the last beta release is
tomlurl=$(curl -s https://static.rust-lang.org/manifests.txt | grep -i beta | tail -1)
versionline=$(curl -s $tomlurl | grep -i version | sed -n '2p') # I tried grabbing both in one line, but something's tripping up curl
commit_date=$([[ $versionline =~ ([0-9][0-9]+\-[0-9]+\-[0-9+][^\)]) ]] ; echo ${BASH_REMATCH[1]}) # 2023-06-08
version=$([[ $versionline =~ ([0-9]+\.[0-9]+\.[0-9]+\-beta\.[0-9]+) ]] ; echo ${BASH_REMATCH[1]}) # 0.72.0-beta.4Of course, whatever components aren't necessary can be stripped off before use, e.g.
relver=${version:2}
cat <<EOS > beta
[toolchain]
channel = "1.${relver%.*}"
EOS- it's always a full week behind
- beta version numbers are incremented sooner than stable (maybe @ breakage freeze?)
- beta versions start with a different major version identifier
So perhaps it's best to abandon this idea? Does make me wonder where rustup gets its manifest information from though
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels