diff --git a/README.md b/README.md index a8c7a3f..28c13c0 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,19 @@ More advanced documentation can be found by running any of the `help` commands. atf retrieve help atf target help +Deploy List +----------- +Deploy list gives you an easy way to only deploy files that have changed. This works really well if you are +using some kind of version control. + +It takes a file of the format: + + src/classes/MyClass.cls + src/triggers/MyTrigger.trigger + +You can generate a file like this using `git diff --no-commit-id --name-only` or possibly the script included +in the `examples` directory. + Why This Over Metaforce? ------------------------ * Vim and Sublime plugins (coming soon...) diff --git a/examples/git-changed b/examples/git-changed new file mode 100755 index 0000000..29f655f --- /dev/null +++ b/examples/git-changed @@ -0,0 +1,29 @@ +#! /bin/bash + +############################### +# Author: Ian (ViViDboarder) +# Description: Simple command to generate lists of +# changed files. Designed to work with AbuseTheForce +############################### + +if [ -z "$1" ]; then + + echo "Usage:" + echo "git-changed commit [commit 2]" + echo "" + echo "If one commit is provided:" + echo " Return a list of all files changed in that commit" + echo "" + echo "If two commits are provided:" + echo " Return a list of all files changed between commits" + + exit 0 +fi + +# If there is only one parameter, return the files changed in that commit +if [ -z "$2" ]; then + git diff-tree --no-commit-id --name-only $1 +else + git diff --no-commit-id --name-only $1 $2 +fi + diff --git a/lib/abusetheforce/cli.rb b/lib/abusetheforce/cli.rb index 734d74b..3692a76 100644 --- a/lib/abusetheforce/cli.rb +++ b/lib/abusetheforce/cli.rb @@ -256,7 +256,12 @@ module AbuseTheForce end end - desc "list", "Deploy a list of files" + desc "list ", "Deploy a list of files" + long_desc <<-LONG_DESC + Parameter is a path a file containing a realtive list of files to be deployed. + + This can be handily used with git diff + LONG_DESC def list(list_path) # Check that this file exists