Onset: version control where nobody waits and nothing gets lost. The on command, its core and onset-server.
| VERSION=$1 |
| 6 | DIR=$2 |
| 7 | BASE=${VCS_DOWNLOADS:-https://downloads.coline.dev/vcs} |
| 8 | printf '{\n "version": "%s",\n "platforms": {\n' "$VERSION" |
| 9 | first=1 |
| 10 | for f in "$DIR"/vcs-"$VERSION"-*.tar.gz; do |
| 11 | platform=$(basename "$f" .tar.gz) |
| 12 | platform=${platform#vcs-"$VERSION"-} |
| 13 | sha=$(sha256sum "$f" | cut -d' ' -f1) |
| 14 | [ "$first" = 1 ] || printf ',\n' |
| 15 | first=0 |
| 16 | printf ' "%s": {"url": "%s/%s/%s", "sha256": "%s"}' "$platform" "$BASE" "$VERSION" "$(basename "$f")" "$sha" |
| 17 | done |
| 18 | printf '\n }\n}\n' |
| 19 |