2
2
# Deploy rules and helpers
3
3
4
4
$archive_name = "archived_docs.basho.com.tar.bz2"
5
+ $archive_url = "http://s3.amazonaws.com/downloads.basho.com/documentation_content/#{ $archive_name} "
5
6
6
7
def do_fetch_archived_content ( )
7
8
# Fetch and extract the archived content that we want to survive from the
@@ -13,21 +14,22 @@ def do_fetch_archived_content()
13
14
# If we don't have wget. Error out.
14
15
Kernel . abort ( "ERROR: #{ $archive_name} was not found, and this system " \
15
16
"does not have access to `wget`.\n " \
16
- " Please either install `wget` and re-run this " \
17
- "deploy, or manually download the file from the below " \
18
- "address and place it into this directory.\n " \
19
- " http://s3.amazonaws.com/downloads.basho.com/documentation_content/#{ $archive_name} " )
17
+ " Please either;\n " \
18
+ " * install `wget` and re-run this deploy, or\n " \
19
+ " * manually download the file from the below URL " \
20
+ "and place it into this directory.\n " \
21
+ " #{ $archive_url} " )
20
22
else
21
23
# We have wget, but not the file. Fetch it.
22
24
puts ( " Using wget to fetch #{ $archive_name} " \
23
25
"(this may take some time)..." )
24
- successful = system ( "wget http://s3.amazonaws.com/downloads.basho.com/documentation_content/ #{ $archive_name } " )
26
+ successful = system ( "wget #{ $archive_url } " )
25
27
26
28
if ( not successful )
27
29
Kernel . abort ( "ERROR: Failed to get #{ $archive_name} \n " \
28
- " Please download the file from the below " \
29
- "address and copy it into this directory.\n " \
30
- " http://s3.amazonaws.com/downloads.basho.com/documentation_content/ #{ $archive_name } " )
30
+ " Please download the file from the below URL " \
31
+ "and copy it into this directory.\n " \
32
+ " #{ $archive_url } " )
31
33
end
32
34
end
33
35
end
@@ -51,9 +53,11 @@ def do_fetch_archived_content()
51
53
if ( web_md5 != loc_md5 )
52
54
Kernel . abort ( "ERROR: Fetched #{ $archive_name} does not match the " \
53
55
"expected md5sum.\n " \
54
- " Please remove the current #{ $archive_name} , reset " \
55
- "the contents of the static/ directory (`git clean -xdf " \
56
- "static; git checkout -f static`), and re-run this script." )
56
+ " Please:\n " \
57
+ " * remove (`rm`) the current #{ $archive_name} \n " \
58
+ " * reset the contents of the static/ directory " \
59
+ "(`git clean -xdf static; git checkout -f static`)\n " \
60
+ " * re-run this script." )
57
61
end
58
62
end
59
63
@@ -72,8 +76,10 @@ def do_fetch_archived_content()
72
76
( File . exist? ( "static/shared" ) ) )
73
77
if ( not all_dirs_present and any_dirs_present )
74
78
Kernel . abort ( "ERRPR: The static/ directory is verifiably corrupt.\n " \
75
- " Please run \` git clean -xdf static/\` to clear out " \
76
- "the malformed files, and re-run this deploy script." )
79
+ " Please:\n "
80
+ " * reset the contents of the static/ directory " \
81
+ "(`git clean -xdf static; git checkout -f static`)\n " \
82
+ " * re-run this script." )
77
83
elsif ( not any_dirs_present )
78
84
puts ( "Extracting #{ $archive_name} (this may take a lot of time)..." )
79
85
successful = system ( "tar -xjf #{ $archive_name} -C static" )
0 commit comments