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