Skip to content

response file

Mohamed Hassan edited this page Jan 1, 2025 · 2 revisions

A response file is a file that contains a set of options and arguments for appvey. Response files is useful in the following scenarios:

  • To invoke appvey by specifying input that is longer than the character limit of the terminal.
  • To invoke the same command repeatedly without retyping the whole line.
  • you have multiple account/tokens and need to run a command for an account.

To use a response file, enter the file name prefixed by an @ sign wherever in the line you want to insert commands, options, and arguments.

The .rsp file extension is a common convention, but you can use any file extension.

The following commands are equivalent:

appvey project history --slug cloudbuilder -t secret_token --account my_account

appvey @project_history.rsp

appvey  --slug cloudbuilder  @token.rsp
  • Contents of project_history.rsp:
# --slug my_slug
--slug cloudbuilder 
-t secret_token 
--account my_account

  • Contents of token.rsp:
# token is stored in file
-t @token.txt
--account my_account

The syntax rules that determine how the text in a response file is interpreted:

  • Any text start # symbol is treated as a comment and ignored.
  • Args are delimited by spaces. A line that contains -t secret_token is treated as two args, -t and secret_token.
  • Multiple arguments enclosed in quotes are interpreted as a single arg, e.g, a line that contains "c://path/to myfile.txt" is treated as one arg: "c://path/to myfile.txt". -Args prefixed with @ can reference additional response files.
  • The response file can have multiple lines of text.

Using response file as a command alias

User can create response file for the most common commands he use and avoid typing the command and its options. A fixed folder can be used to store all response files.

Example

create a response file named recent.rsp in a folder 'appveyor' to run the most recent build.

The contents of the file recent.rsp:

# token and account are stored in environment variables or 
build recent --slug cloudbuilder 

# use other response file @token.rsp
build recent --slug cloudbuilder @token.rsp 

The contents of token.rsp file:

--token v2.12abc3
--account my_account

To use the response file:

cd appveyor
appvey @recent.
Clone this wiki locally