bug fixes updated version
Some checks failed
Publish Alpha Package to npm / publish (push) Has been cancelled
Some checks failed
Publish Alpha Package to npm / publish (push) Has been cancelled
This commit is contained in:
parent
058b1652d3
commit
5f90d2e34b
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@debros/cli",
|
||||
"version": "0.0.12-alpha",
|
||||
"version": "0.0.13-alpha",
|
||||
"description": "DeBros CLI tool for managing deployments to the DeBros network",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@ -414,15 +414,15 @@ export async function getAppVersions(appName: string): Promise<
|
||||
});
|
||||
|
||||
// Sort by timestamp, newest first
|
||||
const versions = appEntries.sort((a, b) =>
|
||||
const versions = appEntries.sort((a: any, b: any) =>
|
||||
new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime()
|
||||
);
|
||||
|
||||
// Mark only the latest version as deployed if any are deployed
|
||||
const latestDeployedIndex = versions.findIndex(v => v.deployed);
|
||||
const latestDeployedIndex = versions.findIndex((v: any) => v.deployed);
|
||||
if (latestDeployedIndex !== -1) {
|
||||
// Set all versions to not deployed
|
||||
versions.forEach(v => v.deployed = false);
|
||||
versions.forEach((v: any) => v.deployed = false);
|
||||
// Set only the latest to deployed
|
||||
versions[latestDeployedIndex].deployed = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user