Skip to content

Feature Request: option to store scripts as discrete files on web server instead of embedding #106

@discentem

Description

@discentem

Right now Gorilla requires users to embed check, pre-install, and post-install scripts in Catalogs. I'd love to see an option to store these scripts on the web server as normal .ps1 files and point to them with relative paths from the Catalog. I'm happy to write a pull request, I just have some questions.

  1. Would you accept such a feature?
  2. Should I cache the scripts on the client and reuse your already-built IfNeeded machinery?
  3. I am thinking I am going to need to add new keys to Item and InstallCheck. Any preference or opinions on the names of the new keys? I was thinking something like PreScriptPath, PostScriptPath, and ScriptPath.

Example:

type Item struct {
	Dependencies []string      `yaml:"dependencies"`
	DisplayName  string        `yaml:"display_name"`
	Check        InstallCheck  `yaml:"check"`
	Installer    InstallerItem `yaml:"installer"`
	Uninstaller  InstallerItem `yaml:"uninstaller"`
	Version      string        `yaml:"version"`
	BlockingApps []string	   `yaml:"blocking_apps"`
	PreScript	 string        `yaml:"preinstall_script"`
	PreScriptPath string `yaml:"preinstall_script_path"` // <--- new key
	PostScript   string        `yaml:"postinstall_script"`
	PostScriptPath string `yaml:"postinstall_script_path"` // <--- new key
}
....

type InstallCheck struct {
	File     []FileCheck `yaml:"file"`
	Script   string      `yaml:"script"` 
	ScriptPath string `yaml:"scriptPath"` // <--- new key
	Registry RegCheck    `yaml:"registry"`
}
....

Thanks!
Brandon

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions