octopress-deploy 1.0.5 → 1.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/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/octopress-deploy/commands.rb +1 -0
- data/lib/octopress-deploy/s3.rb +18 -9
- data/lib/octopress-deploy/version.rb +1 -1
- data/test/_clash.yml +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6606cff1ff42e965567713c41b4da108d87e9b6f
|
4
|
+
data.tar.gz: 2d2a9ddc507baaed0bb08b255a5092839ac8ed02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d20780fe819e5233b6debeab56442de4fef9470bb6123869635b9bc614689a6c783cc81f36a12414c1110e3979309888ded340cb5229bd0dc03d7c585c43c41d
|
7
|
+
data.tar.gz: fb5bf4c2574fa50fa05301464426cfb13233d1bfbda31871ed1d5bc3c7d1a1cd01e08a671dfc5b8ca906348bb61c097f80b61d6b13f270645f82848a7672004b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -87,6 +87,7 @@ account access information.
|
|
87
87
|
| `secret_access_key` | AWS secret key | |
|
88
88
|
| `remote_path` | Directory files should be synced to. | / |
|
89
89
|
| `verbose` | [optional] Display all file actions during deploy. | false |
|
90
|
+
| `incremental` | [optional] Incremental deploy (only updated files) | false |
|
90
91
|
| `region` | [optional] Region for your AWS bucket | us-east-1 |
|
91
92
|
| `delete` | Delete files in `remote_path` not found in `site_dir` | false |
|
92
93
|
| `headers` | Set headers for matched files | [] |
|
@@ -75,6 +75,7 @@ module Octopress
|
|
75
75
|
c.option 'region', '-r', '--region REGION', 'AWS region (default: us-east-1)'
|
76
76
|
c.option 'remote_path', '-d', '--dir DIR', 'Deploy site into a subdirectory.'
|
77
77
|
c.option 'verbose', '-v', '--verbose', 'Log verbose output when deploying'
|
78
|
+
c.option 'incremental', '-i', '--incremental', 'Only upload new/changed files'
|
78
79
|
c.option 'delete', '--delete', 'Sync file deletion'
|
79
80
|
add_common_init_options(c)
|
80
81
|
|
data/lib/octopress-deploy/s3.rb
CHANGED
@@ -19,6 +19,7 @@ module Octopress
|
|
19
19
|
@region = options[:region] || ENV['AWS_DEFAULT_REGION'] || 'us-east-1'
|
20
20
|
@remote_path = (options[:remote_path] || '/').sub(/^\//,'')
|
21
21
|
@verbose = options[:verbose]
|
22
|
+
@incremental = options[:incremental]
|
22
23
|
@delete = options[:delete]
|
23
24
|
@headers = options[:headers] || []
|
24
25
|
@remote_path = @remote_path.sub(/^\//,'') # remove leading slash
|
@@ -76,12 +77,21 @@ module Octopress
|
|
76
77
|
s3_filename = remote_path(file)
|
77
78
|
o = @bucket.objects[s3_filename]
|
78
79
|
file_with_options = get_file_with_metadata(file, s3_filename);
|
80
|
+
s3sum = o.etag.tr('"','')
|
79
81
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
82
|
+
if @incremental && (s3sum == Digest::MD5.file(file).hexdigest)
|
83
|
+
if @verbose
|
84
|
+
puts "= #{remote_path(file)}"
|
85
|
+
else
|
86
|
+
progress('=')
|
87
|
+
end
|
88
|
+
else
|
89
|
+
o.write(file_with_options)
|
90
|
+
if @verbose
|
91
|
+
puts "+ #{remote_path(file)}"
|
92
|
+
else
|
93
|
+
progress('+')
|
94
|
+
end
|
85
95
|
end
|
86
96
|
end
|
87
97
|
end
|
@@ -229,10 +239,9 @@ module Octopress
|
|
229
239
|
#{"secret_access_key: #{options[:secret_access_key]}".ljust(40)} # Keep it safe; keep it secret. Keep this file in your .gitignore.
|
230
240
|
#{"remote_path: #{options[:remote_path] || '/'}".ljust(40)} # relative path on bucket where files should be copied.
|
231
241
|
#{"region: #{options[:remote_path] || 'us-east-1'}".ljust(40)} # Region where your bucket is located.
|
232
|
-
#{"verbose:
|
233
|
-
|
234
|
-
#{"
|
235
|
-
#{"# verbose: #{options[:verbose] || 'false'}".ljust(40)} # Print out all file operations.
|
242
|
+
#{"verbose: #{options[:verbose] || 'false'}".ljust(40)} # Print out all file operations.
|
243
|
+
#{"incremental: #{options[:incremental] || 'false'}".ljust(40)} # Only upload new/changed files
|
244
|
+
#{"delete: #{options[:delete] || 'false'}".ljust(40)} # Remove files from destination which do not match source files.
|
236
245
|
CONFIG
|
237
246
|
end
|
238
247
|
|
data/test/_clash.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorator
|