s3_website 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/bin/s3_website +12 -1
- data/changelog.md +4 -0
- data/lib/s3_website/version.rb +1 -1
- data/release +6 -1
- data/s3_website.gemspec +4 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59c642cd9caf480db7c459c0afc1cce75fbd2607
|
4
|
+
data.tar.gz: 8d89f4fe66225d5d9e13ca6f31061aa346aa5fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1936d48506991ef66a6237fff4ae563c1c47a26c0721af565cfd4a27c7626d48cbd389a88ace698ef5119808cb8c344c94ca75b9387d8d71e5f71c654a066711
|
7
|
+
data.tar.gz: 186650b5b8629ae6136d722226c178a148e8bbd640a5d4fbd964cc0b702ba78f9a54e20627815935289379bb6ec9462f8791a780925a157509dc8f71529acd53
|
data/.gitignore
CHANGED
data/bin/s3_website
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require File.expand_path(File.dirname(__FILE__)+ '/../lib/s3_website')
|
4
4
|
require 'colored'
|
5
|
+
require 'digest/md5'
|
5
6
|
|
6
7
|
class Cfg < Thor
|
7
8
|
desc 'create', 'Create a config file with placeholder values'
|
@@ -157,8 +158,18 @@ def resolve_jar(project_root, logger)
|
|
157
158
|
File.exists? jar_path
|
158
159
|
}.
|
159
160
|
first
|
161
|
+
def jar_has_valid_checksum(jar_path, logger)
|
162
|
+
expected_checksum = File.read(File.dirname(__FILE__) + '/../resources/s3_website.jar.md5')
|
163
|
+
found_checksum = Digest::MD5.file(jar_path).hexdigest
|
164
|
+
if expected_checksum == found_checksum
|
165
|
+
true
|
166
|
+
else
|
167
|
+
logger.info_msg "The jar file has invalid checksum. Expected #{expected_checksum} but got #{found_checksum}"
|
168
|
+
false
|
169
|
+
end
|
170
|
+
end
|
160
171
|
jar_file =
|
161
|
-
if found_jar
|
172
|
+
if found_jar and jar_has_valid_checksum(found_jar, logger)
|
162
173
|
found_jar
|
163
174
|
else
|
164
175
|
is_development = File.exists?(project_root + '/.git')
|
data/changelog.md
CHANGED
data/lib/s3_website/version.rb
CHANGED
data/release
CHANGED
@@ -16,9 +16,14 @@ def run(cmd)
|
|
16
16
|
end
|
17
17
|
|
18
18
|
puts "Building s3_website.jar..."
|
19
|
+
jar_location = 'target/scala-2.11/s3_website.jar'
|
19
20
|
run "./sbt clean"
|
20
21
|
run "./sbt assembly"
|
21
22
|
|
23
|
+
# The bin s3_website uses the MD5 checksum to verify that the jar is not corrupted
|
24
|
+
jar_md5 = Digest::MD5.file(jar_location).hexdigest
|
25
|
+
File.write('resources/s3_website.jar.md5', jar_md5)
|
26
|
+
|
22
27
|
tag_name = "v#{version}"
|
23
28
|
run "git tag #{tag_name} && git push origin #{tag_name}"
|
24
29
|
run "git push"
|
@@ -32,5 +37,5 @@ release = client.create_release(
|
|
32
37
|
:body => "See https://github.com/laurilehmijoki/s3_website/blob/master/changelog.md##{version.gsub('.', '')}"
|
33
38
|
)
|
34
39
|
puts "Uploading s3_website.jar..."
|
35
|
-
client.upload_asset(release[:url],
|
40
|
+
client.upload_asset(release[:url], jar_location)
|
36
41
|
run "gem push pkg/s3_website-#{version}.gem"
|
data/s3_website.gemspec
CHANGED
@@ -25,7 +25,10 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency 'rake', '10.1.1'
|
26
26
|
s.add_development_dependency 'octokit', '3.1.0'
|
27
27
|
|
28
|
-
s.files = `git ls-files
|
28
|
+
s.files = `git ls-files`
|
29
|
+
.split("\n")
|
30
|
+
.reject { |f| f.match('sbt-launch.jar') } # Reject the SBT jar, as it is a big file
|
31
|
+
.push('resources/s3_website.jar.md5') # Include the checksum file in the gem
|
29
32
|
s.test_files = `git ls-files -- src/test/*`.split("\n")
|
30
33
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
31
34
|
s.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_website
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lauri Lehmijoki
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- project/plugins.sbt
|
124
124
|
- release
|
125
125
|
- resources/configuration_file_template.yml
|
126
|
+
- resources/s3_website.jar.md5
|
126
127
|
- s3_website.gemspec
|
127
128
|
- sbt
|
128
129
|
- src/main/java/s3/website/ByteHelper.java
|