/// <summary>
        /// Filters binaries that are in common with orchard web project binaries.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="moduleBinaries">Collection of binaries.</param>
        /// <param name="orchardWebBinaries">Collection of Orchard.Web project binaries.</param>
        /// <returns>Collection of binaries that are shared.</returns>
        public static FilePathCollection Filter(ICakeContext context, FilePathCollection moduleBinaries, FilePathCollection orchardWebBinaries) {
            if (context == null) {
                throw new ArgumentNullException(nameof(context));
            }
            if (moduleBinaries == null || orchardWebBinaries == null) {
                throw new ArgumentNullException("A FilePathCollection is empty.");
            }

            var orchardWebAssemblies = new HashSet<string>(
                orchardWebBinaries.Select(item => item.ToString()),
                StringComparer.InvariantCultureIgnoreCase);

            return new FilePathCollection(moduleBinaries
                .Where(item => orchardWebAssemblies.Contains(item.ToString())), PathComparer.Default);
        }
Example #2
0
        /// <summary>
        /// Filters binaries that are in common with orchard web project binaries.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="moduleBinaries">Collection of binaries.</param>
        /// <param name="orchardWebBinaries">Collection of Orchard.Web project binaries.</param>
        /// <returns>Collection of binaries that are shared.</returns>
        public static FilePathCollection Filter(ICakeContext context, FilePathCollection moduleBinaries, FilePathCollection orchardWebBinaries)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (moduleBinaries == null || orchardWebBinaries == null)
            {
                throw new ArgumentNullException("A FilePathCollection is empty.");
            }

            var orchardWebAssemblies = new HashSet <string>(
                orchardWebBinaries.Select(item => item.ToString()),
                StringComparer.InvariantCultureIgnoreCase);

            return(new FilePathCollection(moduleBinaries
                                          .Where(item => orchardWebAssemblies.Contains(item.ToString())), PathComparer.Default));
        }
Example #3
0
        public static void SignCli(Context context)
        {
            FilePath      file      = context.PackageDir.CombineWithFilePath("VGAudioCli.zip");
            DirectoryPath extracted = context.PackageDir.Combine(file.GetFilenameWithoutExtension().ToString());

            context.DeleteDirectory(extracted, false);
            context.Unzip(file, extracted);

            FilePathCollection toSign = context.GetFiles($"{extracted}/**/VGAudio*.exe");

            toSign.Add(context.GetFiles($"{extracted}/**/VGAudio*.dll"));
            toSign.Add(context.PackageDir.CombineWithFilePath("VGAudioCli.exe"));
            toSign.Add(context.PackageDir.CombineWithFilePath("VGAudioTools.exe"));

            SignFiles(context, toSign.Where(context.FileExists), context.ReleaseCertThumbprint);
            context.Zip(extracted, context.PackageDir.CombineWithFilePath(file.GetFilename()));
            context.DeleteDirectory(extracted, false);
        }