Implemented software update installation.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good
This commit is contained in:
parent
645a1b6220
commit
3d8e6325b2
@ -104,14 +104,21 @@ export const appUpdateCurrentRouteHandler = async (req, res) => {
|
||||
return res.status(404).send({ error: `No build found for branch "${requestedBranch}"` });
|
||||
}
|
||||
|
||||
var version = undefined;
|
||||
try {
|
||||
version = build.displayName.split('-b')[0].replaceAll('v', '').trim();
|
||||
} catch (error) {
|
||||
logger.error('Failed to parse version from build display name:', error);
|
||||
}
|
||||
|
||||
return res.send({
|
||||
branch: requestedBranch,
|
||||
buildNumber: build.number,
|
||||
|
||||
version: version,
|
||||
buildUrl: build.url,
|
||||
buildResult: build.result,
|
||||
buildName: build.displayName,
|
||||
buildTimestamp: build.timestamp,
|
||||
builtAt: new Date(build.timestamp).toISOString(),
|
||||
buildSource: source,
|
||||
artifacts: mapArtifacts(build, requestedBranch),
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user