19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# File 'lib/crabfarm/modes/publisher.rb', line 19
def publish(_path, _options={})
@crawler_path = _path
@options = _options
load_config
return unless dry_run or check_credentials
detect_git_repo
if inside_git_repo?
if not unsafe and is_tree_dirty?
puts "Aborting: Your working copy has uncommited changes! Use the --unsafe option to force.".color(:red)
return
end
load_files_from_git
else
load_files_from_fs
end
build_package
compress_package
generate_signature
send_package if not dry_run and ensure_valid_remote
end
|