salesforce-deploy-tool 2.1.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/sf +1 -1
- data/build.xml +1 -0
- data/features/config.feature +7 -7
- data/features/pull.feature +7 -7
- data/features/push.feature +124 -69
- data/features/resources/mock/ant +201 -0
- data/features/resources/repo/COMMIT_EDITMSG +1 -0
- data/features/resources/repo/HEAD +1 -0
- data/features/resources/repo/config +5 -0
- data/features/resources/repo/description +1 -0
- data/features/resources/repo/hooks/applypatch-msg.sample +15 -0
- data/features/resources/repo/hooks/commit-msg.sample +24 -0
- data/features/resources/repo/hooks/post-update.sample +8 -0
- data/features/resources/repo/hooks/pre-applypatch.sample +14 -0
- data/features/resources/repo/hooks/pre-commit.sample +49 -0
- data/features/resources/repo/hooks/pre-push.sample +54 -0
- data/features/resources/repo/hooks/pre-rebase.sample +169 -0
- data/features/resources/repo/hooks/prepare-commit-msg.sample +36 -0
- data/features/resources/repo/hooks/update.sample +128 -0
- data/features/resources/repo/index +0 -0
- data/features/resources/repo/info/exclude +6 -0
- data/features/resources/repo/logs/HEAD +10 -0
- data/features/resources/repo/logs/refs/heads/master +10 -0
- data/features/resources/repo/objects/08/d159fb570535461d73a45322c66495b5025c20 +3 -0
- data/features/resources/repo/objects/0a/ce763c3b6bc010c2a9a193f7d7c7bc03172800 +0 -0
- data/features/resources/repo/objects/18/75bbbe3a395a8d38c1097bfeda33da7995d8ba +0 -0
- data/features/resources/repo/objects/1b/f3c07d11fce01d255838eebd41a066e20e09f0 +0 -0
- data/features/resources/repo/objects/1d/300e3c8d30b80bb88cfce2b16c3070488f0440 +2 -0
- data/features/resources/repo/objects/1d/b81d6385e52f1ac897d8c119a01537b1624c05 +2 -0
- data/features/resources/repo/objects/1f/eb7a27c44c4b82a4e0551752e3aec20d39e867 +0 -0
- data/features/resources/repo/objects/21/a8635d944fb9d9c1779a5ce7a0e0e3ae0b560f +0 -0
- data/features/resources/repo/objects/21/f12831957736ffc4b5cb11beaf61020badb5ba +0 -0
- data/features/resources/repo/objects/24/f97074eaba38f18c29b4d89781a20bacd65bed +2 -0
- data/features/resources/repo/objects/25/8a8c1f2d788fa12fa87f994e96b3efbf2d0415 +0 -0
- data/features/resources/repo/objects/26/d3f397fe0eda1d7639542edf47982e408b856a +0 -0
- data/features/resources/repo/objects/2c/0414f10c4cb61f2ae352d54f36e84b877d49b8 +3 -0
- data/features/resources/repo/objects/3c/94ea5d2b74886cefeb5ecf7f7380bc8223e05b +0 -0
- data/features/resources/repo/objects/3d/0be981f941d665b9ffc59d0d734ceb18e1c551 +0 -0
- data/features/resources/repo/objects/3f/260c2394be8a70772376832c561d33365dc74c +0 -0
- data/features/resources/repo/objects/41/341113250717ca1d4e280cac7413074e110ceb +1 -0
- data/features/resources/repo/objects/44/b93fe01a1dfc0639577dd16969715bd9e6fe0c +0 -0
- data/features/resources/repo/objects/47/913885995720fb59e94d5766314a4728ea1944 +0 -0
- data/features/resources/repo/objects/48/587cabf050866f63b8743da1dbe0ebae23b348 +2 -0
- data/features/resources/repo/objects/51/394a26665e0ad7708091db12aff4510384fb2f +2 -0
- data/features/resources/repo/objects/51/f1b7da07050f62cd00f24774856a9d06d4fc47 +4 -0
- data/features/resources/repo/objects/54/5a9377aeb6a9d4e143c95e398c8968b35944cb +1 -0
- data/features/resources/repo/objects/58/acc8fd3f0888c0d4c735dbf945b8adc982723f +0 -0
- data/features/resources/repo/objects/59/c81a96f4e0b1ed588190e2c097c325556ab0df +2 -0
- data/features/resources/repo/objects/60/192eb56263416d0221556f33ffd4220aa536d4 +0 -0
- data/features/resources/repo/objects/6a/eb5e2a8bda5b4f04cbd2d942ae7940bf796c25 +4 -0
- data/features/resources/repo/objects/72/4a3c7678b7274af8806d0395594f3b0a059fcc +0 -0
- data/features/resources/repo/objects/76/8d5ed4528f6043dee289c7da0001c8a3ce45e4 +0 -0
- data/features/resources/repo/objects/79/e1ba418010d81ca3472ee271ce83abbea5104f +0 -0
- data/features/resources/repo/objects/7f/ee222d7d4008f9d6a6c6e5f10ef4923299c93d +2 -0
- data/features/resources/repo/objects/80/1416a319f26aac530d3663d8cd214cf7b7ef65 +0 -0
- data/features/resources/repo/objects/83/bbfc790b9974134c1591192634fa771075b535 +0 -0
- data/features/resources/repo/objects/87/09c1bfb261dedf83ab5793054940782c48b54f +2 -0
- data/features/resources/repo/objects/89/3df81588c577cfbae991baa7211062faacd4a0 +0 -0
- data/features/resources/repo/objects/8c/15363be6659c514f5e2cafd817efc656106027 +0 -0
- data/features/resources/repo/objects/90/0dd02ce96c29b918d4f38c0721ac61a62e2c75 +0 -0
- data/features/resources/repo/objects/91/54141b78af68bdeb8e9b79629012a720b6e8e5 +4 -0
- data/features/resources/repo/objects/93/50c5598f6bafd3aa1a6a6ceecec7f02a0b0203 +2 -0
- data/features/resources/repo/objects/96/b1ab4d31f29b149ff0b7eb60cb3a38dbaef37d +0 -0
- data/features/resources/repo/objects/99/9db58eef630156ab2fc4aa4a9451fb77c0137f +2 -0
- data/features/resources/repo/objects/9b/c11cdc1094120c76a59f222671d754297d3ea5 +0 -0
- data/features/resources/repo/objects/9f/2d034a0b311fc3ea68d920d100f8e3143cc664 +0 -0
- data/features/resources/repo/objects/a3/9d3fe0c289c12308749b73da61076bb4e1689d +2 -0
- data/features/resources/repo/objects/a5/ab41fa374d2682939feb0f8fcbf9b243544f5c +0 -0
- data/features/resources/repo/objects/aa/c66ee0d404c124fbcafd32a054664de4fdd3da +3 -0
- data/features/resources/repo/objects/ae/5379d68c15b3fc95efa7e6a640972865ef6d3d +0 -0
- data/features/resources/repo/objects/b8/580fa58bf91133b28d162bf2572667ae54c18d +0 -0
- data/features/resources/repo/objects/b9/4c5cf17b7e3baca053deb44fa0f6306eb7b890 +0 -0
- data/features/resources/repo/objects/bf/ae3371a43e95ebfbb1dd0643810a52cd958f14 +1 -0
- data/features/resources/repo/objects/cb/db0117efc4c6709ae5069a1dcefe841666a704 +0 -0
- data/features/resources/repo/objects/cf/235b88b53b5cf3031e67bfd6ab5a7b3ca25c52 +0 -0
- data/features/resources/repo/objects/d3/48f3b026e759f584548729a04f3b91ceb2e8d3 +0 -0
- data/features/resources/repo/objects/d3/7b8a2c894dbe1839d9428a336806ee151c2e4d +0 -0
- data/features/resources/repo/objects/d3/b508d876f1639a96afed4ca1d22c38583ea2d6 +0 -0
- data/features/resources/repo/objects/d5/cb74bf363ffbb0c7a1c69ee8b0bcf1e6093774 +0 -0
- data/features/resources/repo/objects/db/3cff2d90ba3bbcee7dd1113db69ac2b7b5e3a0 +0 -0
- data/features/resources/repo/objects/de/7978b6e388de73ddc31dbfc6a9afa030449cb1 +0 -0
- data/features/resources/repo/objects/e0/72bdd8a68660581d612b509ea7dc5d1dd1cfa1 +0 -0
- data/features/resources/repo/objects/e1/39fc1a7d4eca5e8b483cafa3af47d983a99e1b +0 -0
- data/features/resources/repo/objects/e7/4644c031e1cf36a268ae5041fb8dc7104bd357 +0 -0
- data/features/resources/repo/objects/ef/bfccdbb185bc64cb49d9942a53b7ab97e21b21 +0 -0
- data/features/resources/repo/objects/f5/bcc39104bda892895e9f338b45bad76b333d80 +0 -0
- data/features/resources/repo/objects/fb/4f268988e268cbf3bcc50ff338f98054e803cb +2 -0
- data/features/resources/repo/objects/fd/6723ee7c9a7acea74ab84f4af159952279d51f +0 -0
- data/features/resources/repo/objects/ff/8c6fa78f879d98393ca470a4ea07cae7221d38 +4 -0
- data/features/resources/repo/refs/heads/master +1 -0
- data/features/support/env.rb +19 -9
- data/features/support/hooks.rb +2 -34
- data/lib/salesforcedeploytool/app.rb +9 -3
- data/lib/salesforcedeploytool/cli.rb +9 -1
- data/lib/salesforcedeploytool/version.rb +1 -1
- data/salesforce-deploy-tool.gemspec +1 -1
- data/tpl/build.xml.erb +15 -2
- metadata +175 -5
- data/cucumber-config.yaml-tpl +0 -15
Binary file
|
@@ -0,0 +1,10 @@
|
|
1
|
+
0000000000000000000000000000000000000000 8709c1bfb261dedf83ab5793054940782c48b54f Juan Breinlinger <juan.brein@breins.net> 1421673202 +0000 commit (initial): initial commit
|
2
|
+
8709c1bfb261dedf83ab5793054940782c48b54f d37b8a2c894dbe1839d9428a336806ee151c2e4d Juan Breinlinger <juan.brein@breins.net> 1421683182 +0000 push
|
3
|
+
d37b8a2c894dbe1839d9428a336806ee151c2e4d ff8c6fa78f879d98393ca470a4ea07cae7221d38 Juan Breinlinger <juan.brein@breins.net> 1421830431 +0000 push
|
4
|
+
ff8c6fa78f879d98393ca470a4ea07cae7221d38 41341113250717ca1d4e280cac7413074e110ceb Juan Breinlinger <juan.brein@breins.net> 1427455933 +0000 push
|
5
|
+
41341113250717ca1d4e280cac7413074e110ceb 1db81d6385e52f1ac897d8c119a01537b1624c05 Juan Breinlinger <juan.brein@breins.net> 1427701644 +0100 push
|
6
|
+
1db81d6385e52f1ac897d8c119a01537b1624c05 9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 Juan Breinlinger <juan.brein@breins.net> 1427701742 +0100 push
|
7
|
+
9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 51f1b7da07050f62cd00f24774856a9d06d4fc47 Juan Breinlinger <juan.brein@breins.net> 1427701839 +0100 push
|
8
|
+
51f1b7da07050f62cd00f24774856a9d06d4fc47 9154141b78af68bdeb8e9b79629012a720b6e8e5 Juan Breinlinger <juan.brein@breins.net> 1427702375 +0100 push
|
9
|
+
9154141b78af68bdeb8e9b79629012a720b6e8e5 1d300e3c8d30b80bb88cfce2b16c3070488f0440 Juan Breinlinger <juan.brein@breins.net> 1433250117 +0100 push
|
10
|
+
1d300e3c8d30b80bb88cfce2b16c3070488f0440 aac66ee0d404c124fbcafd32a054664de4fdd3da Juan Breinlinger <juan.brein@breins.net> 1433313758 +0100 push
|
@@ -0,0 +1,10 @@
|
|
1
|
+
0000000000000000000000000000000000000000 8709c1bfb261dedf83ab5793054940782c48b54f Juan Breinlinger <juan.brein@breins.net> 1421673202 +0000 commit (initial): initial commit
|
2
|
+
8709c1bfb261dedf83ab5793054940782c48b54f d37b8a2c894dbe1839d9428a336806ee151c2e4d Juan Breinlinger <juan.brein@breins.net> 1421683182 +0000 push
|
3
|
+
d37b8a2c894dbe1839d9428a336806ee151c2e4d ff8c6fa78f879d98393ca470a4ea07cae7221d38 Juan Breinlinger <juan.brein@breins.net> 1421830431 +0000 push
|
4
|
+
ff8c6fa78f879d98393ca470a4ea07cae7221d38 41341113250717ca1d4e280cac7413074e110ceb Juan Breinlinger <juan.brein@breins.net> 1427455933 +0000 push
|
5
|
+
41341113250717ca1d4e280cac7413074e110ceb 1db81d6385e52f1ac897d8c119a01537b1624c05 Juan Breinlinger <juan.brein@breins.net> 1427701644 +0100 push
|
6
|
+
1db81d6385e52f1ac897d8c119a01537b1624c05 9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 Juan Breinlinger <juan.brein@breins.net> 1427701742 +0100 push
|
7
|
+
9350c5598f6bafd3aa1a6a6ceecec7f02a0b0203 51f1b7da07050f62cd00f24774856a9d06d4fc47 Juan Breinlinger <juan.brein@breins.net> 1427701839 +0100 push
|
8
|
+
51f1b7da07050f62cd00f24774856a9d06d4fc47 9154141b78af68bdeb8e9b79629012a720b6e8e5 Juan Breinlinger <juan.brein@breins.net> 1427702375 +0100 push
|
9
|
+
9154141b78af68bdeb8e9b79629012a720b6e8e5 1d300e3c8d30b80bb88cfce2b16c3070488f0440 Juan Breinlinger <juan.brein@breins.net> 1433250117 +0100 push
|
10
|
+
1d300e3c8d30b80bb88cfce2b16c3070488f0440 aac66ee0d404c124fbcafd32a054664de4fdd3da Juan Breinlinger <juan.brein@breins.net> 1433313758 +0100 push
|
@@ -0,0 +1 @@
|
|
1
|
+
x��A� E]s�ٛ���c�Ko1�Ak,5����#�����<McCthU��)�KZ�(���:O^dHV3��Շ��9��gv>{R�(�u�V]dq��D^�ڞs���nU���C*�_9
|
@@ -0,0 +1 @@
|
|
1
|
+
x=��j�@Dsޯ��9F�E� !9,�ڙV�i�i��߯�a�TEU�������C��e���n�n��=$^�H�Y pQ�P�A�HP�©m�~��UI�q%�`x���4��Q!�B������Q����:�8ӵ�q �#������أ�t������Wخ�ئ]�Y��q�=��:c�+�����2����W�
|
@@ -0,0 +1 @@
|
|
1
|
+
x=��N�@D=�W�{�<$!+�&�|A3��$3Ӥ���E1ۧ�TU^�x|z��o���k�>����7�W�/q#���*Tg��ET���w�m�ˌ�$�ƴ�$0��fn�"+�5u�P���|_ͩƅ��'�4��J8�<�-�DgH�^}s����|�?k:�ʲL�������u��ߖǸ.���67Z�
|
@@ -0,0 +1 @@
|
|
1
|
+
aac66ee0d404c124fbcafd32a054664de4fdd3da
|
data/features/support/env.rb
CHANGED
@@ -2,19 +2,25 @@ require 'aruba/cucumber'
|
|
2
2
|
require 'filewatcher'
|
3
3
|
require 'git'
|
4
4
|
|
5
|
-
#
|
6
|
-
|
5
|
+
# Necesary environment variables:
|
6
|
+
ENV["SFDT_GIT_REPO"] = File.join(Dir.pwd,'features/resources/repo')
|
7
|
+
ENV["SFDT_GIT_DIR"] = 'repo'
|
8
|
+
ENV["SFDT_SRC_DIR"] = 'salesforce/src'
|
9
|
+
ENV["SFDT_USERNAME"] = 'john.doe@example.com'
|
10
|
+
ENV["SFDT_PASSWORD"] = 'mysecurepass'
|
11
|
+
ENV["SFDT_SANDBOX"] = 'testEnv'
|
12
|
+
|
13
|
+
# Create a temprary home directory:
|
14
|
+
new_home = File.join(Dir.pwd,'tmp','home')
|
15
|
+
ENV["HOME"] = new_home
|
16
|
+
FileUtils.rm_rf new_home if Dir.exists? new_home
|
17
|
+
FileUtils.mkdir new_home
|
7
18
|
|
8
19
|
# Cucumber / aruba configuration parameters
|
9
20
|
Before do
|
10
21
|
@aruba_timeout_seconds = 300
|
11
|
-
|
12
|
-
|
13
|
-
# Set environment variables
|
14
|
-
Before do
|
15
|
-
config[:environment_variables].keys.each do |key|
|
16
|
-
ENV[key.to_s.upcase] = config[:environment_variables][key]
|
17
|
-
end
|
22
|
+
# Use mock ant
|
23
|
+
FileUtils.cp "features/resources/mock/ant","bin/ant"
|
18
24
|
end
|
19
25
|
|
20
26
|
# Remove current configurations only once
|
@@ -28,3 +34,7 @@ Before '@push,@pull' do
|
|
28
34
|
name = File.join 'tmp', 'aruba', ENV['SFDT_GIT_DIR']
|
29
35
|
Git.clone(uri, name)
|
30
36
|
end
|
37
|
+
|
38
|
+
at_exit do
|
39
|
+
FileUtils.rm 'bin/ant'
|
40
|
+
end
|
data/features/support/hooks.rb
CHANGED
@@ -1,17 +1,10 @@
|
|
1
|
-
config = YAML::load(File.open('cucumber-config.yaml'))
|
2
|
-
|
3
|
-
When /^I type my salesforce (.*)$/ do |input|
|
4
|
-
raise "Please create credentials.yaml" if config[input.to_sym].nil?
|
5
|
-
type(config[input.to_sym])
|
6
|
-
end
|
7
|
-
|
8
1
|
When /^I delete the repository directory/ do
|
9
2
|
FileUtils.rm_rf File.join 'tmp', 'aruba', ENV['SFDT_GIT_DIR']
|
10
3
|
end
|
11
4
|
|
12
5
|
When /^I watch "(.+)" for changes and copy to "(.+)"$/ do |file,dest|
|
13
|
-
file = File.join('tmp','aruba',file)
|
14
|
-
dest = File.join('tmp','aruba',dest)
|
6
|
+
file = File.join(Dir.pwd,'tmp','aruba',file)
|
7
|
+
dest = File.join(Dir.pwd,'tmp','aruba',dest)
|
15
8
|
fork do
|
16
9
|
FileWatcher.new(file).watch do |filename|
|
17
10
|
FileUtils.cp file, dest
|
@@ -19,28 +12,3 @@ When /^I watch "(.+)" for changes and copy to "(.+)"$/ do |file,dest|
|
|
19
12
|
end
|
20
13
|
end
|
21
14
|
end
|
22
|
-
|
23
|
-
Transform /^.+$/ do |arg|
|
24
|
-
case arg
|
25
|
-
when String
|
26
|
-
config[:replacement_patterns].keys.each do |key|
|
27
|
-
arg = arg.gsub /#{key.to_s}/, config[:replacement_patterns][key]
|
28
|
-
end
|
29
|
-
config[:environment_variables].keys.each do |key|
|
30
|
-
arg = arg.gsub /#{key.to_s}/, config[:environment_variables][key]
|
31
|
-
end
|
32
|
-
when Cucumber::Ast::Table
|
33
|
-
arg.cell_matrix.each do |c|
|
34
|
-
config[:replacement_patterns].keys.each do |key|
|
35
|
-
c[1].value = c[1].value.gsub /#{key.to_s}/, config[:replacement_patterns][key]
|
36
|
-
end
|
37
|
-
config[:environment_variables].keys.each do |key|
|
38
|
-
c[1].value = c[1].value.gsub /#{key.to_s}/, config[:environment_variables][key]
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
arg
|
44
|
-
|
45
|
-
end
|
46
|
-
|
@@ -4,6 +4,7 @@ module SalesforceDeployTool
|
|
4
4
|
|
5
5
|
attr_accessor :build_number
|
6
6
|
attr_accessor :run_all_tests
|
7
|
+
attr_accessor :check_only
|
7
8
|
|
8
9
|
def initialize config
|
9
10
|
|
@@ -26,6 +27,7 @@ module SalesforceDeployTool
|
|
26
27
|
@server_url = config[:salesforce_url]
|
27
28
|
|
28
29
|
# Defaults
|
30
|
+
@check_only = false
|
29
31
|
@run_tests = []
|
30
32
|
@debug ||= config[:debug]
|
31
33
|
@build_number ||= 'N/A'
|
@@ -166,14 +168,18 @@ module SalesforceDeployTool
|
|
166
168
|
end
|
167
169
|
|
168
170
|
if @run_all_tests
|
169
|
-
cmd = " ant
|
171
|
+
cmd = " ant deployAndTestCode"
|
170
172
|
else
|
171
|
-
if @run_tests
|
172
|
-
cmd = " ant
|
173
|
+
if ! @run_tests.empty?
|
174
|
+
cmd = " ant deployAndRunSpecifiedTests"
|
173
175
|
else
|
174
176
|
cmd = " ant deployCode"
|
175
177
|
end
|
176
178
|
end
|
179
|
+
|
180
|
+
if @check_only
|
181
|
+
cmd = " ant checkOnlyCode"
|
182
|
+
end
|
177
183
|
|
178
184
|
full_cmd = env_vars + cmd
|
179
185
|
|
@@ -79,16 +79,19 @@ module SalesforceDeployTool
|
|
79
79
|
c.option "--build_number NUMBER","Record build number on version file"
|
80
80
|
c.option "--run-all-tests", "-T", "Deploy and test"
|
81
81
|
c.option "--run-tests CSV_LIST", "-r CSV_LIST", "a CSV list of individual classes to run tests"
|
82
|
+
c.option "--check-only", "-c", "Check only, don't deploy"
|
83
|
+
c.option "--include CSV_LIST", "-i CSV_LIST", "A CSV list of metadata type to include when creating destructiveChange.xml"
|
82
84
|
c.action do |args, options|
|
83
85
|
|
84
86
|
# short flag mapping
|
87
|
+
options.check_only = true if options.c
|
85
88
|
options.run_all_tests = true if options.T
|
86
89
|
options.run_tests = options.r if options.r
|
87
90
|
options.exclude = options.x if options.x
|
88
91
|
options.sandbox = options.s if options.s
|
92
|
+
options.include = options.i if options.i
|
89
93
|
|
90
94
|
# Parameter validation:
|
91
|
-
|
92
95
|
if options.run_all_tests and options.run_tests
|
93
96
|
puts "warning: --run-tests is ignored as --test has been declared "
|
94
97
|
end
|
@@ -119,6 +122,7 @@ module SalesforceDeployTool
|
|
119
122
|
config_tmp[:git_dir] = File.join(config[:tmp_dir],'repo_copy')
|
120
123
|
FileUtils.cp_r config[:git_dir],config_tmp[:git_dir]
|
121
124
|
sfdt_tmp = SalesforceDeployTool::App.new config_tmp
|
125
|
+
sfdt_tmp.clean_git_dir
|
122
126
|
print "INFO: Pulling changes from #{config[:sandbox]} using url #{config[:salesforce_url]} to temporary directory to generate destructiveChanges.xml "
|
123
127
|
print( options.debug.nil? ? "" : "\n\n" )
|
124
128
|
sfdt_tmp.pull
|
@@ -130,6 +134,7 @@ module SalesforceDeployTool
|
|
130
134
|
dc_gen.destination = File.join(config_tmp[:git_dir],config_tmp[:src_dir])
|
131
135
|
dc_gen.output = destructive_change_file
|
132
136
|
dc_gen.exclude = options.exclude.split(',') unless options.exclude.nil?
|
137
|
+
dc_gen.include = options.include.split(',') unless options.include.nil?
|
133
138
|
dc_gen.verbose = false if not options.debug
|
134
139
|
dc_gen.generate_destructive_changes
|
135
140
|
|
@@ -145,6 +150,9 @@ module SalesforceDeployTool
|
|
145
150
|
sfdt.run_all_tests = options.run_all_tests.nil? ? false : true
|
146
151
|
sfdt.run_tests = options.run_tests.split(',') unless options.run_tests.nil?
|
147
152
|
|
153
|
+
# Check only option:
|
154
|
+
sfdt.check_only = options.check_only
|
155
|
+
|
148
156
|
# Push
|
149
157
|
print( options.run_all_tests.nil? && options.run_tests.nil? ? "INFO: Deploying code to #{config[:sandbox]}: ": "INFO: Deploying and Testing code to #{config[:sandbox]}: " )
|
150
158
|
print( options.debug.nil? ? "" : "\n\n" )
|
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_runtime_dependency 'git', "~> 1.2"
|
28
28
|
spec.add_runtime_dependency 'colorize', "~> 0.7"
|
29
29
|
spec.add_runtime_dependency 'commander', "~> 4.2"
|
30
|
-
spec.add_runtime_dependency 'salesforce-dcgen', "~> 0.
|
30
|
+
spec.add_runtime_dependency 'salesforce-dcgen', "~> 0.8.0"
|
31
31
|
end
|
data/tpl/build.xml.erb
CHANGED
@@ -19,21 +19,34 @@
|
|
19
19
|
</sf:deploy>
|
20
20
|
</target>
|
21
21
|
|
22
|
-
<target name="
|
22
|
+
<target name="checkOnlyCode">
|
23
23
|
<sf:deploy
|
24
24
|
username="${env.SF_USERNAME}"
|
25
25
|
password="${env.SF_PASSWORD}"
|
26
26
|
serverurl="${env.SF_SERVERURL}"
|
27
27
|
deployRoot="${env.SF_SRC_DIR}"
|
28
28
|
maxPoll="200"
|
29
|
+
checkOnly="true"
|
29
30
|
rollbackOnError="true" >
|
31
|
+
</sf:deploy>
|
32
|
+
</target>
|
33
|
+
|
34
|
+
<target name="deployAndRunSpecifiedTests">
|
35
|
+
<sf:deploy
|
36
|
+
username="${env.SF_USERNAME}"
|
37
|
+
password="${env.SF_PASSWORD}"
|
38
|
+
serverurl="${env.SF_SERVERURL}"
|
39
|
+
deployRoot="${env.SF_SRC_DIR}"
|
40
|
+
maxPoll="200"
|
41
|
+
rollbackOnError="true"
|
42
|
+
testLevel="RunSpecifiedTests">
|
30
43
|
<% @run_tests.each do |test| -%>
|
31
44
|
<runTest><%= test %></runTest>
|
32
45
|
<% end -%>
|
33
46
|
</sf:deploy>
|
34
47
|
</target>
|
35
48
|
|
36
|
-
<target name="
|
49
|
+
<target name="deployAndTestCode">
|
37
50
|
<sf:deploy
|
38
51
|
username="${env.SF_USERNAME}"
|
39
52
|
password="${env.SF_PASSWORD}"
|