Exemplo n.º 1
0
            public Task <bool> Restore(string path)
            {
                var goPath = new DirectoryInfo(Path.Combine(path, ".go"));

                if (!goPath.Exists)
                {
                    goPath.Create();
                }

                return(_dockerContainer
                       .WithVolume(path, "/usr/local/src", true)
                       .Run("get -v -t -d ./..."));
            }
Exemplo n.º 2
0
            public async Task <bool> Restore(string path)
            {
                var requirementsFile = Path.Combine(path, "requirements.txt");

                if (!File.Exists(requirementsFile))
                {
                    return(true);
                }

                return(await _dockerContainer
                       .WithVolume(path, "/usr/local/src", true)
                       .EntryPoint("pip")
                       .Run("install -r requirements.txt --target ./.out --upgrade"));
            }