Skip to content

Commit

Permalink
feat: Create a ruby script to download a release binaries
Browse files Browse the repository at this point in the history
and get SHA256 checksums
  • Loading branch information
ashchan committed Nov 5, 2019
1 parent c136b30 commit acfa6e9
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/release-checksums.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby

tag = ARGV[0]
puts "generate release checksums for #{tag}"

windows_exe = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-win-installer.exe"
macos_zip = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-mac.zip"
macos_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-mac.dmg"
linux_appimage = "https://github.com/nervosnetwork/neuron/releases/download/#{tag}/Neuron-#{tag}-linux-x86_64.AppImage"

# TODO: Download binaries and calculate checksums

windows_exe_sha256 = "{WINDOWS_EXE_SHA256}"
macos_zip_sha256 = "{MACOS_ZIP_SHA256}"
macos_dmg_sha256 = "{MACOS_DMG_SHA256}"
linux_appimage_sha256 = "{LINUX_APPIMAGE_SHA256}"

checksums = %(
### Downloads
OS | Arch | Package | SHA256 Checksum
-- | -- | -- | --
Windows | x64 | [exe](#{windows_exe}) | <code>#{windows_exe_sha256}</code>
macOS | x64 | [zip](#{macos_zip}) | <code>#{macos_zip_sha256}</code>
macOS | x64 | [DMG](#{macos_dmg}) | <code>#{macos_dmg_sha256}</code>
Linux | x64 | [AppImage](#{linux_appimage}) | <code>#{linux_appimage_sha256}</code>
)

puts checksums

0 comments on commit acfa6e9

Please sign in to comment.