Skip to content

Commit 2839857

Browse files
committed
🔨 checksum script
1 parent a8474ef commit 2839857

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
- funding_uri
1818
- mailing_list_uri
1919
- Installation and usage documentation (@pboling)
20+
- Checksums for released gems (@pboling)
21+
### Changed
22+
- Gem releases are now cryptographically signed (@pboling)
2023

2124
## [1.0.3] - 2022-09-06
2225
### Fixed

bin/checksum

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
require 'digest/sha2'
5+
gems = Dir['*.gem']
6+
puts "Found: #{gems.inspect}"
7+
raise 'Too Many Gems' if gems.length > 1
8+
9+
built_gem_path = gems.first
10+
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
11+
checksum_path = "checksum/#{built_gem_path}.sha512"
12+
File.open(checksum_path, 'w') { |f| f.write(checksum) }
13+
puts "You must now git add and commit '#{checksum_path}'"

0 commit comments

Comments
 (0)