scttnlsn / dandelion

Incremental Git repository deployment.
http://scttnlsn.github.io/dandelion
MIT License
738 stars 57 forks source link

provide params on command line #80

Closed yegor256 closed 10 years ago

yegor256 commented 10 years ago

I'm trying to use dandelion together with Travis-CI, in order to deploy my public (!) repository through FTP to my private server. I can't do it at the moment, because I have to hard-code FTP password inside dandelion.yml file. That means that my FTP credentials will be publicly available in Github.

Instead, would be great to have an ability to run:

dandelion deploy -Dpassword=secret123

Then, in dandelion.yml I will use:

password: ${password}
scttnlsn commented 10 years ago

Instead of creating separate command-line options for each config parameter would environment variables do the trick?

I'm thinking that dandelion.yml could be interpreted as ERB so you could write:

password: <%= ENV['DANDELION_PASSWORD'] %>

And then run:

DANDELION_PASSWORD=secret123 dandelion deploy

Would that satisfy your use case?

yegor256 commented 10 years ago

yes, that will be even better

scttnlsn commented 10 years ago

This is in v0.4.4

bluejorts commented 8 years ago

Can this be added to the readme? It's pretty useful info.

scttnlsn commented 8 years ago

@Polymetric Good call. Added this to the README (https://github.com/scttnlsn/dandelion/commit/58b4c21e91456d0e0f96affe3205a3054195f232)