Beispiel #1
0
        /// <summary>
        ///     Adds extra files to be included with the box
        /// </summary>
        /// <param name="settings">The settings</param>
        /// <param name="files">Collection of <see cref="FilePath" /> objects to add to the package</param>
        /// <returns>The updated settings object</returns>
        public static VagrantPackageSettings IncludeInPackage(this VagrantPackageSettings settings,
                                                              params FilePath[] files)
        {
            var paths = settings.AdditionalFilePaths.ToList();

            paths.AddRange(files.Select(f => f.FullPath));
            settings.AdditionalFilePaths = paths;
            return(settings);
        }
Beispiel #2
0
 /// <summary>
 ///     Sets the base image to use when packaging the machine
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="id">VM name or UUID</param>
 /// <returns>The updated settings object</returns>
 public static VagrantPackageSettings UseBaseImage(this VagrantPackageSettings settings, string id)
 {
     settings.BaseImageName = id;
     return(settings);
 }
Beispiel #3
0
 /// <summary>
 ///     Sets the filename for the package output
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="path">Path to output the package to</param>
 /// <returns>The updated settings object</returns>
 public static VagrantPackageSettings OutputToFile(this VagrantPackageSettings settings, FilePath path)
 {
     settings.OutputFile = path.FullPath;
     return(settings);
 }
Beispiel #4
0
 /// <summary>
 ///     Includes an additional Vagrantfile with the packaged box
 /// </summary>
 /// <param name="settings">The settings</param>
 /// <param name="vagrantFile"><see cref="FilePath" /> for the Vagrantfile to include</param>
 /// <returns>The updated settings object</returns>
 public static VagrantPackageSettings IncludeVagrantFile(this VagrantPackageSettings settings,
                                                         FilePath vagrantFile)
 {
     settings.VagrantFile = vagrantFile.FullPath;
     return(settings);
 }