Skip to content

Commit

Permalink
Support for CLI multi endpoints deployment (#2117)
Browse files Browse the repository at this point in the history
* error handle on generate command

* support for cli deployment on multi-endpoints

* updated changelog
  • Loading branch information
bz888 authored Oct 23, 2023
1 parent e214cb9 commit 835c181
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Support for multi endpoints CLI deployment (#2117)

## [4.0.5] - 2023-10-18
### Changed
Expand Down
7 changes: 5 additions & 2 deletions packages/cli/src/controller/deploy-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function deployToHostedService(
data: {
version: ipfsCID,
dictEndpoint: dictEndpoint,
endpoint: endpoint,
endpoint: splitEndpoints(endpoint),
advancedSettings: {
query: query,
indexer: indexer,
Expand Down Expand Up @@ -166,7 +166,7 @@ export async function redeploy(
data: {
version: ipfsCID,
dictEndpoint: dictEndpoint,
endpoint: endpoint,
endpoint: splitEndpoints(endpoint),
indexerImageVersion: indexerVersion,
queryImageVersion: queryVersion,
advancedSettings: {
Expand Down Expand Up @@ -246,6 +246,9 @@ export async function imageVersions(name: string, version: string, authToken: st
errorHandle(e, 'Failed to get image:');
}
}
export function splitEndpoints(endpointStr: string): string[] {
return endpointStr.split(',').map((e) => e.trim());
}
interface EndpointType {
network: string;
endpoint: string;
Expand Down

0 comments on commit 835c181

Please sign in to comment.