From 70691b7ab49581c0f039195751a7d40c294f4c7e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 27 Apr 2020 06:08:27 +0000 Subject: [PATCH] TODO translate versions --- flutter/versions.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 flutter/versions.js diff --git a/flutter/versions.js b/flutter/versions.js new file mode 100644 index 0000000..5bbefc5 --- /dev/null +++ b/flutter/versions.js @@ -0,0 +1,26 @@ +"use strict"; + +var request = require("@root/request"); + +// TODO +// get list of supported platforms and archetectures +// get list of channels and versions for such +// return matching versions/channels as well as urls +// map from darwin, linux, windows + +module.platforms = async function () { + return [ + ["macos", "amd64"], + ["linux", "amd64"], + ["windows", "amd64"], + ]; +}; + +module.versions = async function (os, _arch) { + return request({ + url: + "https://storage.googleapis.com/flutter_infra/releases/releases_" + + os + + ".json", + }); +}; -- 2.25.1