bin/sf in salesforce-deploy-tool-1.0.0 vs bin/sf in salesforce-deploy-tool-1.0.1
- old
+ new
@@ -26,19 +26,21 @@
FileUtils.touch file
end
end
# Grab variables from env if not in the config files
-config[:buildxml_dir] = ENV["SFDT_BUILDXML_DIR"] || config[:buildxml_dir]
config[:git_dir] = ENV["SFDT_GIT_DIR"] || config[:git_dir]
config[:tmp_dir] = ENV["SFDT_TMP_DIR"] || config[:tmp_dir]
config[:version_file] = ENV["SFDT_VERSION_FILE"] || config[:version_file]
config[:build_number_pattern] = ENV["SFDT_BUILD_NUMBER_PATTERN"] || config[:build_number_pattern]
config[:commit_hash_pattern] = ENV["SFDT_COMMIT_HASH_PATTERN"] || config[:commit_hash_pattern]
config[:git_repo] = ENV["SFDT_GIT_REPO"] || config[:git_repo]
config[:username] = ENV["SFDT_USERNAME"] || config[:username]
config[:password] = ENV["SFDT_PASSWORD"] || config[:password]
config[:deploy_ignore_files] = ENV["SFDT_DEPLOY_IGNORE_FILES"].nil? ? config[:deploy_ignore_files] : ENV["DEPLOY_IGNORE_FILES"].split(',')
+
+# Default values
+config[:buildxml_dir] = ENV["SFDT_BUILDXML_DIR"] || config[:buildxml_dir] || ''
# Minimal config validation
abort "Config error: git_dir not found in #{GLOBAL_CONFIG_FILE} or through SFDT_GIT_DIR" if config[:git_dir].nil?
abort "Config error: tmp_dir not found in #{GLOBAL_CONFIG_FILE} or through SFDT_TMP_DIR" if config[:tmp_dir].nil?