render the nightly builds (#452)

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus authored and GitHub committed 2026-01-14 11:13:10 +01:00
1 parent 285065632e
commit 4f4e925517
1 file changed
+45 -43
+45 -43
View File
@@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
# This script updates `index.md` in the GitHub Pages root directory provided # This script updates `index.md` in the GitHub Pages root directory provided
# by the required argument to be passed. The file will be updated to simply # by the required argument to be passed. The file will be updated to render
# render the `resolc-bin` JSON data for each of the supported platforms. # the `resolc-bin` release data as a formatted table for each supported platform.
# `index.md` is the file served by GitHub Pages after being built by Jekyll # `index.md` is the file served by GitHub Pages after being built by Jekyll
# and the Markdown processed by kramdown. # and the Markdown processed by kramdown.
@@ -33,20 +33,22 @@ for file in "${build_info_files[@]}"; do
fi fi
done done
# Sort the data by version in descending order. # Render builds as a markdown table with clickable links
sort_by_version_descending() { render_builds_table() {
local build_info_file="$1" local build_info_file="$1"
if [ -z "$build_info_file" ]; then if [ -z "$build_info_file" ]; then
echo "Error: A file path argument is required for sorting" echo "Error: A file path argument is required"
return 1 return 1
fi fi
# Load the data and sort builds and releases with the latest version first. # Sort builds by version descending and render as markdown table
data=$(jq '.' "$build_info_file") jq -r '
sorted_data=$(echo "$data" | jq '.builds = (.builds | sort_by(.version) | reverse) | .builds | sort_by(.version) | reverse |
.releases = (.releases | to_entries | sort_by(.key) | reverse | from_entries)') ["| Release | Solc Versions | SHA256 |", "|---------|---------------|--------|"] +
[.[] |
echo "$sorted_data" | jq . "| [\(.name) \(.longVersion)](\(.url)) | \(.firstSolcVersion) - \(.lastSolcVersion) | `\(.sha256[0:16])...` |"
] | .[]
' "$build_info_file"
} }
echo "Updating GitHub Pages index.md file..." echo "Updating GitHub Pages index.md file..."
@@ -64,92 +66,92 @@ The information is synced with the [resolc-bin GitHub repository](https://github
## Linux ## Linux
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $linux)
$(sort_by_version_descending $linux)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/linux/list.json)
## MacOS ## MacOS
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $macos)
$(sort_by_version_descending $macos)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/macos/list.json)
## Wasm ## Wasm
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $wasm)
$(sort_by_version_descending $wasm)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/wasm/list.json)
## Windows ## Windows
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $windows)
$(sort_by_version_descending $windows)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/windows/list.json)
## Nightly ## Nightly
### Linux ### Linux
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $nightly_linux)
$(sort_by_version_descending $nightly_linux)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/nightly/linux/list.json)
### MacOS ### MacOS
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $nightly_macos)
$(sort_by_version_descending $nightly_macos)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/nightly/macos/list.json)
### Wasm ### Wasm
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $nightly_wasm)
$(sort_by_version_descending $nightly_wasm)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/nightly/wasm/list.json)
### Windows ### Windows
<details> <details>
<summary>See builds</summary> <summary>See builds</summary>
{% highlight json %} $(render_builds_table $nightly_windows)
$(sort_by_version_descending $nightly_windows)
{% endhighlight %}
</details> </details>
[JSON](https://paritytech.github.io/resolc-bin/nightly/windows/list.json)
EOF EOF
echo "File has been updated!" echo "File has been updated!"