This class provides the helper methods to create and update the nuspec file.
Inheritance: NuGetGallery.FunctionalTests.HelperBase
 /// <summary>
 /// Creates a package with the specified minclient version.
 /// </summary>
 /// <param name="packageName"></param>
 /// <param name="version"></param>
 /// <param name="minClientVersion"></param>
 /// <returns></returns>
 public async Task<string> CreatePackageWithMinClientVersion(string packageName, string version, string minClientVersion)
 {
     var nuspecHelper = new NuspecHelper(TestOutputHelper);
     string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, version);
     NuspecHelper.AddMinClientVersionAttribute(nuspecFileFullPath, minClientVersion);
     return await CreatePackageInternal(nuspecFileFullPath);
 }
Exemple #2
0
        /// <summary>
        /// Creates a package with the specified framework version folder.
        /// </summary>
        /// <param name="packageName"></param>
        /// <param name="packageVersion"></param>
        /// <param name="frameworkVersion"></param>
        /// <returns></returns>
        public async Task <string> CreatePackageWithTargetFramework(string packageName, string packageVersion, string frameworkVersion)
        {
            var    nuspecHelper       = new NuspecHelper(TestOutputHelper);
            string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, packageVersion);

            return(await CreatePackageWithTargetFrameworkInternal(nuspecFileFullPath, frameworkVersion));
        }
 /// <summary>
 /// Creates a windows 8 curated package given the package name and version.
 /// </summary>
 /// <param name="packageName"></param>
 /// <param name="version"></param>
 /// <returns></returns>
 public async Task<string> CreateWebMatrixCuratedPackage(string packageName, string version = "1.0.0")
 {
     var nuspecHelper = new NuspecHelper(TestOutputHelper);
     string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, version);
     NuspecHelper.AddWebMatrixTag(nuspecFileFullPath);
     return await CreatePackageInternal(nuspecFileFullPath);
 }
 /// <summary>
 /// Creates a package given the package name and version.
 /// </summary>
 public async Task<string> CreatePackage(string packageName, string version = "1.0.0", string minClientVersion = null, string title = null, string tags = null, string description = null, string licenseUrl = null, string dependencies = null)
 {
     var nuspecHelper = new NuspecHelper(TestOutputHelper);
     string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, version, minClientVersion, title, tags, description, licenseUrl, dependencies);
     var path = await CreatePackageInternal(nuspecFileFullPath);
     return path;
 }
Exemple #5
0
        /// <summary>
        /// Creates a package with the specified minclient version.
        /// </summary>
        /// <param name="packageName"></param>
        /// <param name="version"></param>
        /// <param name="minClientVersion"></param>
        /// <returns></returns>
        public async Task <string> CreatePackageWithMinClientVersion(string packageName, string version, string minClientVersion)
        {
            var    nuspecHelper       = new NuspecHelper(TestOutputHelper);
            string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, version);

            NuspecHelper.AddMinClientVersionAttribute(nuspecFileFullPath, minClientVersion);
            return(await CreatePackageInternal(nuspecFileFullPath));
        }
        /// <summary>
        /// Creates a windows 8 curated package given the package name and version.
        /// </summary>
        /// <param name="packageName"></param>
        /// <param name="version"></param>
        /// <returns></returns>
        public async Task <string> CreateWebMatrixCuratedPackage(string packageName, string version = "1.0.0")
        {
            var    nuspecHelper       = new NuspecHelper(TestOutputHelper);
            string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, version);

            NuspecHelper.AddWebMatrixTag(nuspecFileFullPath);
            return(await CreatePackageInternal(nuspecFileFullPath));
        }
Exemple #7
0
        /// <summary>
        /// Creates a package given the package name and version.
        /// </summary>
        public async Task <string> CreatePackage(string packageName, string version = "1.0.0", string minClientVersion = null, string title = null, string tags = null, string description = null, string licenseUrl = null, string dependencies = null)
        {
            var    nuspecHelper       = new NuspecHelper(TestOutputHelper);
            string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, version, minClientVersion, title, tags, description, licenseUrl, dependencies);

            var path = await CreatePackageInternal(nuspecFileFullPath);

            return(path);
        }
        /// <summary>
        /// Creates a package with the license expression.
        /// </summary>
        /// <returns></returns>
        public async Task <string> CreatePackageWithLicenseExpression(string packageName, string packageVersion, string licenseUrl, string licenseExpression)
        {
            var nuspecHelper       = new NuspecHelper(TestOutputHelper);
            var nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, packageVersion, licenseUrl : licenseUrl);

            var nuspecDir = Path.GetDirectoryName(nuspecFileFullPath);

            var nupkgFileFullPath = await CreatePackageInternal(nuspecFileFullPath);

            var nuspecFileName = packageName + ".nuspec";

            NuspecHelper.AddLicenseExpression(nuspecFileFullPath, licenseExpression);
            ReplaceNuspecFileInNupkg(nupkgFileFullPath, nuspecFileFullPath, nuspecFileName);

            return(nupkgFileFullPath);
        }
 /// <summary>
 /// Creates a package with the specified framework version folder.
 /// </summary>
 /// <param name="packageName"></param>
 /// <param name="packageVersion"></param>
 /// <param name="frameworkVersion"></param>
 /// <returns></returns>
 public async Task<string> CreatePackageWithTargetFramework(string packageName, string packageVersion, string frameworkVersion)
 {
     var nuspecHelper = new NuspecHelper(TestOutputHelper);
     string nuspecFileFullPath = await nuspecHelper.CreateDefaultNuspecFile(packageName, packageVersion);
     return await CreatePackageWithTargetFrameworkInternal(nuspecFileFullPath, frameworkVersion);
 }