Per la decisione di Alberto del 18 novembre 2026 (niente componenti esterni) i flussi di verifica, rilascio e pulizia non usano più azioni JavaScript, che vogliono Node: - sorgenti con git init/fetch e il gettone del lavoro, passato a git solo nell'ambiente del passo, mai scritto nella configurazione; - SDK .NET con .gitea/scripts/dotnet.sh, dai metadati di Microsoft e verificato con lo SHA-512 prima di installarlo nella cache degli strumenti del runner; - builder buildx creato da costruisci-immagine.sh builder; - artefatti nel pacchetto generico febe-ci del registro di Gitea (artefatti.sh, con REGISTRY_TOKEN), tolti dalla pulizia del lunedì dopo 14 giorni; la release ricostruisce installatore e zip invece di riceverli da un altro lavoro; - JSON letto con un lettore in awk POSIX (json.awk) per i controlli e per la scelta delle versioni del registro, al posto di versioni-registro.js; - contenitore delle prove debian:trixie al posto di node:24-trixie; - la prova della pagina di accesso gira in Chromium invece che in Node. controlli.sh rifiuta ora un flusso con uses:, tabulazioni o rientri dispari, e le prove nuove controllano l'assenza di Node, il passo dei sorgenti uguale in ogni lavoro, l'SDK prima di ogni dotnet, la scelta dell'SDK, il caricamento degli artefatti con un curl finto e la scadenza dei vecchi. Nessuna esecuzione vera di Gitea Actions: ciò che resta da vedere è in docs/processo.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
2.1 KiB
Awk
57 lines
2.1 KiB
Awk
# For dotnet.sh, with json.awk: in the release metadata of a .NET channel (releases.json of
|
|
# builds.dotnet.microsoft.com/dotnet/release-metadata/<channel>/), the newest SDK («latest-sdk») and the address and
|
|
# SHA-512 of its archive for the rid asked:
|
|
#
|
|
# LC_ALL=C awk -v rid=linux-x64 -f json.awk -f dotnet-sdk.awk releases.json
|
|
#
|
|
# Prints «<version><TAB><address><TAB><sha512>» and exits with 0, or says why on stderr and exits with 1. The archive
|
|
# is the file object with that address: https, on one of Microsoft's two hosts of .NET builds, named
|
|
# dotnet-sdk-<version>-<rid>.tar.gz, with a hash of 128 hexadecimal digits.
|
|
|
|
function json_begin(file) {}
|
|
|
|
function json_open(kind) {
|
|
if (kind == "o") {
|
|
address[json_depth] = ""
|
|
hash[json_depth] = ""
|
|
}
|
|
}
|
|
|
|
function json_scalar(kind, value) {
|
|
if (kind != "s" || json_depth == 0 || json_stack[json_depth] != "o") return
|
|
if (json_depth == 1 && json_at[1] == "latest-sdk") latest = value
|
|
if (json_at[json_depth] == "url") address[json_depth] = value
|
|
if (json_at[json_depth] == "hash") hash[json_depth] = value
|
|
}
|
|
|
|
function json_close(kind) {
|
|
if (kind == "o" && address[json_depth] != "") sha512[address[json_depth]] = hash[json_depth]
|
|
}
|
|
|
|
function json_end(file, error) {
|
|
problem = error
|
|
}
|
|
|
|
END {
|
|
if (problem != "") {
|
|
print "metadati dei rilasci .NET non validi: " problem > "/dev/stderr"
|
|
exit 1
|
|
}
|
|
if (latest !~ /^[0-9]+[.][0-9]+[.][0-9]+(-[0-9A-Za-z.]+)?$/) {
|
|
print "nei metadati dei rilasci .NET manca «latest-sdk» o non è una versione: «" substr(latest, 1, 40) "»" > "/dev/stderr"
|
|
exit 1
|
|
}
|
|
name = "dotnet-sdk-" latest "-" rid ".tar.gz"
|
|
for (candidate in sha512) {
|
|
if (substr(candidate, length(candidate) - length(name)) != "/" name) continue
|
|
if (candidate !~ /^https:[/][/](builds[.]dotnet[.]microsoft[.]com|dotnetcli[.]blob[.]core[.]windows[.]net)[/]/) continue
|
|
if (sha512[candidate] !~ /^[0-9a-fA-F]+$/ || length(sha512[candidate]) != 128) continue
|
|
found = candidate
|
|
}
|
|
if (found == "") {
|
|
print "nei metadati dei rilasci .NET non c'è l'archivio " name " con la sua impronta" > "/dev/stderr"
|
|
exit 1
|
|
}
|
|
print latest "\t" found "\t" tolower(sha512[found])
|
|
}
|