Skip to content

Commit 5961a62

Browse files
committed
Standardise os.sha256_file to be lowercase across platforms
1 parent a0ce68f commit 5961a62

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

utils/buildactions/install_cef.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local CEF_URL_SUFFIX = "_windows32_minimal.tar.bz2"
99

1010
-- Change here to update CEF version
1111
local CEF_VERSION = "80.0.4+g74f7b0c+chromium-80.0.3987.122"
12-
local CEF_HASH = "8FD8E24AF196F00FEAAA1553496BAE99D8196BA023D0DD0FE44EFEEE93B04DFC"
12+
local CEF_HASH = "8fd8e24af196f00feaaa1553496bae99d8196ba023d0dd0fe44efeee93b04dfc"
1313

1414
function make_cef_download_url()
1515
return CEF_URL_PREFIX..http.escapeUrlParam(CEF_VERSION)..CEF_URL_SUFFIX

utils/buildactions/install_discord.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local DISCORD_VENDOR = "vendor/discordgsdk"
99

1010
-- Change these to update the version
1111
local DISCORD_TAG = "v2020-11-02_21-48-56"
12-
local DISCORD_HASH = "4CCEEED0D8B41BDC67C44A6DDCCCF42288AF933E1F7284C591327178C391AA39"
12+
local DISCORD_HASH = "4cceeed0d8b41bdc67c44a6ddcccf42288af933e1f7284c591327178c391aa39"
1313

1414
newaction {
1515
trigger = "install_discord",

utils/buildactions/utils.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,17 @@ function os.expanddir_wildcard(from, to)
8484
end
8585

8686
function os.sha256_file(path)
87+
local s, errc
8788
if os.host() == "windows" then
88-
local s, errc = os.outputof(string.format("powershell -Command (Get-FileHash \"%s\" -Algorithm SHA256).Hash", path))
89-
return (errc == 0) and s or ""
89+
s, errc = os.outputof(string.format("powershell -Command (Get-FileHash \"%s\" -Algorithm SHA256).Hash", path))
9090
else
91-
return os.outputof(string.format("sha256sum \"%s\" | awk '{ print $1 }'", path))
91+
s, errc = os.outputof(string.format("sha256sum \"%s\" | awk '{ print $1 }'", path))
9292
end
93+
if errc ~= 0 then
94+
print("Error os.sha256_file: ", errc)
95+
return ""
96+
end
97+
return s:lower()
9398
end
9499

95100
function os.extract_archive(archive_path, target_path, override)

0 commit comments

Comments
 (0)