Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support input file #50

@chevdor

Description

@chevdor

The ability to pass the variables using an input file would be great.

That means a user could run (for instance):

kickstart \
   https://github.com/some/template \
   --data https://gist.github.com/chevdor/050df6...c6e4207

or

curl https://gist.github.com/chevdor/050df6...c6e4207 | \
   kickstart \
      https://github.com/some/template

where in this example https://gist.github.com/chevdor/050df6...c6e4207 points to a file containing all the fields. This could be a local file or a url.

Since the template is defined in toml, a first implementation could use toml as well.
json can be helpful thanks to the pre/re-processing that can be done using jq.

That allows for instance, storing several sets of values in a single json map for instance:

curl https://gist.github.com/chevdor/050df6...c6e4207 | jq .scenario_1 \
   kickstart \
      https://github.com/some/template

where the json file could be something like:

{
   "scenario_1": {
      "greeting_recipient": "Alice"   
   },
  "scenario_2": {
      "greeting_recipient": "Bob"   
   },
}

That allows one-liners to bootstrap projects without any user input and with more flexibility than just using the default values from the template.

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