Skip to content

Enhancement: Allow script configuration for a specific OS environment/type #484

Description

@estruyf

Currently, the scripts are defined for all OS types. Meaning if you create a bash script, and you would use it for Windows and macOS, it might fail.

A better solution would be the ability to specify scripts per OS type so that you can define a PowerShell script for Windows and a bash script for macOS.

The current script configuration

{
  "$schema": "https://frontmatter.codes/config/custom.scripts.schema.json",
  "title": "Create image folder",
  "id": "create-image-folder",
  "script": "./.frontmatter/config/custom/scripts/create-image-folder.sh",
  "command": "bash"
}

Proposed change:

{
  "$schema": "https://frontmatter.codes/config/custom.scripts.schema.json",
  "title": "Create image folder",
  "id": "create-image-folder",
  "script": "./.frontmatter/config/custom/scripts/create-image-folder.sh",
  "command": "bash",
  "environments": [
    {
      "type": "windows"
      "script": "./.frontmatter/config/custom/scripts/create-image-folder.ps1",
      "command": "powershell"
    }   
  ]
}

By adding the environments property with options for windows, macos, and linux, it would allow you to override the default script for a specific environment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions