Home Download Buy Blog Forum Support

Env variables in build system

Env variables in build system

Postby LeChuck on Tue May 17, 2011 5:23 pm

Hello,

I have created a new build system and I'm trying to pass an env parameter. The doc doesn't have an actual example for that but I've done it this way:

Code: Select all
{
  "cmd":["mycmd", "$file"],
  "env":{ "myvar": "myvalue"}
}


It seems to work as I can then have access to the environment variable "myvar" with the value of "myvalue". However, the problem is that I would like to be able to pass the content of a var, in this precise case I want to use $packages, to pass along the path to the packages folder (plus some subfolders). So I tried:

Code: Select all
{
  "cmd":["mycmd", "$file"],
  "env":{ "myvar": "$packages"}
}


But all that does is pass "$packages" as a literal value. I tried without the quotes but that results in a parsing error. Using vars that way works fine for "cmd", as shown in the online doc, but it doesn't work for "env".

Any ideas?

Thanks!
LeChuck
 
Posts: 2
Joined: Tue May 17, 2011 5:11 pm

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 23 guests