-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix(orchestrator): Add new cliArgs version to support 'export-genesis-head' subcommand and clean the logic to set the version in the diff. providers * typo * add debug
- Loading branch information
Showing
11 changed files
with
81 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 3 additions & 10 deletions
13
javascript/packages/orchestrator/src/providers/native/substrateCliArgsHelper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
import { SubstrateCliArgsVersion } from "../../sharedTypes"; | ||
import { getClient } from "../client"; | ||
|
||
export const getCliArgsVersion = async ( | ||
export const getCliArgsHelp = async ( | ||
image: string, | ||
command: string, | ||
): Promise<SubstrateCliArgsVersion> => { | ||
): Promise<string> => { | ||
const client = getClient(); | ||
const fullCmd = `${command} --help`; | ||
const logs = (await client.runCommand(["-c", fullCmd], { allowFail: true })) | ||
.stdout; | ||
|
||
if (logs.includes("--ws-port <PORT>")) { | ||
return SubstrateCliArgsVersion.V0; | ||
} else if (!logs.includes("--insecure-validator-i-know-what-i-do")) { | ||
return SubstrateCliArgsVersion.V1; | ||
} else { | ||
return SubstrateCliArgsVersion.V2; | ||
} | ||
return logs; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters