Esempio n. 1
0
        public string DownloadRhetosRelease(string version)
        {
            var extractedPath = "";
            var release       = GetReleaseData(version);

            if (release != null)
            {
                var archivePath = MiscHelpers.DownloadRelease(release.Assets.First().BrowserDownloadUrl);
                extractedPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Path.GetFileNameWithoutExtension(archivePath));
                Logging.LogInfo("Extracting {0} to {1}", archivePath, extractedPath);
                MiscHelpers.UnzipFile(archivePath, extractedPath);
                Logging.LogInfo("Extraction done");
            }
            else
            {
                throw new ArgumentException(string.Format("Can't find version {0}", version));
            }
            return(extractedPath);
        }