File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env ruby
22
3+ # curl and sha256sum are required to run this.
4+
35tag = ARGV [ 0 ]
4- puts "generate release checksums for #{ tag } "
6+ puts "Generate release checksums for #{ tag } , this could take a while... "
57
68windows_exe = "https://github.com/nervosnetwork/neuron/releases/download/#{ tag } /Neuron-#{ tag } -win-installer.exe"
79macos_zip = "https://github.com/nervosnetwork/neuron/releases/download/#{ tag } /Neuron-#{ tag } -mac.zip"
810macos_dmg = "https://github.com/nervosnetwork/neuron/releases/download/#{ tag } /Neuron-#{ tag } -mac.dmg"
911linux_appimage = "https://github.com/nervosnetwork/neuron/releases/download/#{ tag } /Neuron-#{ tag } -linux-x86_64.AppImage"
1012
11- # TODO: Download binaries and calculate checksums
13+ def get_sha256_checksum ( url )
14+ %x(curl -L -s #{ url } | sha256sum) . split ( " " ) . first
15+ end
1216
13- windows_exe_sha256 = "{WINDOWS_EXE_SHA256}"
14- macos_zip_sha256 = "{MACOS_ZIP_SHA256}"
15- macos_dmg_sha256 = "{MACOS_DMG_SHA256}"
16- linux_appimage_sha256 = "{LINUX_APPIMAGE_SHA256}"
17+ windows_exe_sha256 = get_sha256_checksum ( windows_exe )
18+ macos_zip_sha256 = get_sha256_checksum ( macos_zip )
19+ macos_dmg_sha256 = get_sha256_checksum ( macos_dmg )
20+ linux_appimage_sha256 = get_sha256_checksum ( linux_appimage )
1721
1822checksums = %(
1923### Downloads
You can’t perform that action at this time.
0 commit comments