Example #1
0
        public Options(string dockerfileVersion, string[] productVersion, string channelName, string versionSourceName, string email, string password, string user,
                       bool computeShas, bool stableBranding)
        {
            DockerfileVersion = dockerfileVersion;
            ProductVersions   = productVersion
                                .Select(pair => pair.Split(new char[] { '=' }, 2))
                                .ToDictionary(split => split[0].ToLower(), split => split.Skip(1).FirstOrDefault());
            ChannelName       = channelName;
            VersionSourceName = versionSourceName;
            GitHubEmail       = email;
            GitHubPassword    = password;
            GitHubUser        = user;
            ComputeChecksums  = computeShas;
            UseStableBranding = stableBranding;

            // Special case for handling the shared dotnet product version variables.
            if (ProductVersions.ContainsKey("runtime"))
            {
                ProductVersions["dotnet"] = ProductVersions["runtime"];
            }
            else if (ProductVersions.ContainsKey("aspnet"))
            {
                ProductVersions["dotnet"] = ProductVersions["aspnet"];
            }
        }
Example #2
0
        public Options(string dockerfileVersion, string[] productVersion, string versionSourceName, string email, string password, string user, bool computeShas)
        {
            DockerfileVersion = dockerfileVersion;
            ProductVersions   = productVersion
                                .Select(pair => pair.Split(new char[] { '=' }, 2))
                                .ToDictionary(split => split[0].ToLower(), split => split[1]);
            VersionSourceName = versionSourceName;
            GitHubEmail       = email;
            GitHubPassword    = password;
            GitHubUser        = user;
            ComputeChecksums  = computeShas;

            // Special case for handling the lzma NuGet package cache.
            if (ProductVersions.ContainsKey("sdk") && DockerfileVersion == "2.1")
            {
                ProductVersions["lzma"] = ProductVersions["sdk"];
            }

            // Special case for handling the shared dotnet product version variables.
            if (ProductVersions.ContainsKey("runtime"))
            {
                ProductVersions["dotnet"] = ProductVersions["runtime"];
            }
            else if (ProductVersions.ContainsKey("aspnet"))
            {
                ProductVersions["dotnet"] = ProductVersions["aspnet"];
            }
        }