Closed VojtechVitek closed 8 years ago
Hi @AmitKumarDas,
$SUP_ENV is not meant just for echo
program.
It is mainly meant for passing the CLI environment variables to another sup
or docker
command from your Supfile.
1) Docker
run:
desc: Docker run on remote machine
run: >
docker run $SUP_ENV ubuntu bash -c 'echo This is MY_VAR: $MY_VAR'
$ sup local run
vojtechvitek@localhost | This is MY_VAR:
$ sup -e MY_VAR=my_value local run
vojtechvitek@localhost | This is MY_VAR: my_value
2) Sup calling another Supfile
db-up:
desc: Migrate database
run: >
sup -f ./database/Supfile $SUP_ENV $SUP_NETWORK up
$ sup -e PGCONNECT_TIMEOUT=10 production db-up
vojtechvitek@localhost | production@example.com | Migrating database..
Hi @VojtechVitek,
I had a query if below output pattern is expected.
1/ My sample Supfile snippet:
2/ Command execution & respective output:
Query - Do we expect the
-e
in the output ? I understand -e is an option for echo command. However, I am still trying to understand the use-case for $SUP_ENV here ? Will--file=sample.txt --filter2=pattern
be a better output of $SUP_ENV ?