122
122
localSource = localSource :gsub (" {branch}" , localBranch )
123
123
124
124
-- Download and process remote manifest
125
- local remoteVer
125
+ local remoteVer , remoteHash
126
126
local remoteFiles = { }
127
127
local remoteSources = { }
128
128
local remoteManText , errMsg = downloadFileText (localSource , " manifest.xml" )
@@ -136,6 +136,7 @@ if remoteManXML and remoteManXML[1].elem == "PoBVersion" then
136
136
if type (node ) == " table" then
137
137
if node .elem == " Version" then
138
138
remoteVer = node .attrib .number
139
+ remoteHash = node .attrib .hash
139
140
elseif node .elem == " Source" then
140
141
if not remoteSources [node .attrib .part ] then
141
142
remoteSources [node .attrib .part ] = { }
@@ -155,7 +156,7 @@ if remoteManXML and remoteManXML[1].elem == "PoBVersion" then
155
156
end
156
157
end
157
158
end
158
- if not remoteVer or not next (remoteSources ) or not next (remoteFiles ) then
159
+ if not remoteVer or not remoteHash or not next (remoteSources ) or not next (remoteFiles ) then
159
160
ConPrintf (" Update check failed: invalid remote manifest" )
160
161
return nil , " Invalid remote manifest"
161
162
end
264
265
265
266
-- Create new manifest
266
267
localManXML = { elem = " PoBVersion" }
267
- table.insert (localManXML , { elem = " Version" , attrib = { number = remoteVer , platform = localPlatform , branch = localBranch } })
268
+ table.insert (localManXML , { elem = " Version" , attrib = { number = remoteVer , hash = remoteHash , platform = localPlatform , branch = localBranch } })
268
269
for part , platforms in pairs (remoteSources ) do
269
270
for platform , url in pairs (platforms ) do
270
271
table.insert (localManXML , { elem = " Source" , attrib = { part = part , platform = platform ~= " any" and platform , url = url } })
0 commit comments