forked from standardnotes/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsums.rb
35 lines (24 loc) · 721 Bytes
/
sums.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'json'
package = JSON.parse(File.read("package.json"))
version = package["version"]
files = [
"Standard Notes-#{version}-mac.zip",
"Standard Notes-#{version}.dmg",
"Standard Notes-#{version}.dmg.blockmap",
"Standard Notes-#{version}-i386.AppImage",
"Standard Notes-#{version}.AppImage",
"Standard Notes Setup #{version}.exe",
"Standard Notes Setup #{version}.exe.blockmap",
"standard-notes_#{version}_amd64.snap",
"latest-linux-ia32.yml",
"latest-linux.yml",
"latest-mac.yml",
"latest.yml"
]
output = ""
files.each do |file|
sum = `cd dist && sha256sum '#{file}'`
output += "#{sum}"
end
File.write('dist/SHA256SUMS', output)
puts "Successfully wrote SHA256SUMS:\n#{output}"