Skip to content

Commit

Permalink
Merge pull request #1238 from contentstack/feat/CS-43272
Browse files Browse the repository at this point in the history
CS-43272- GCP changes for branches plugin
  • Loading branch information
cs-raj authored Jan 10, 2024
2 parents 4238d6e + b3fd55a commit 9df4ada
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion packages/contentstack-branches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ For switching to AZURE-NA region update the hosts at config/default.js
}
```

For switching to GCP-NA region update the hosts at config/default.js

```js
{
host:'https://gcp-na-api.contentstack.com/v3',
cdn: 'https://gcp-na-cdn.contentstack.com/v3',
...
}
```

# Usage

<!-- usage -->
Expand All @@ -37,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-branches
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-branches/1.0.20 darwin-arm64 node-v20.8.0
@contentstack/cli-cm-branches/1.0.20 darwin-arm64 node-v20.10.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-branches",
"description": "Contentstack CLI plugin to do branches operations",
"version": "1.0.20",
"version": "1.0.21",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export function entryCreateScript(contentType) {
text = JSON.stringify(_entry);
}
markdownRegEx = new RegExp(
'(https://(assets|(eu-|azure-na-|azure-eu-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))',
'(https://(assets|(eu-|azure-na-|azure-eu-|gcp-na-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))',
'g',
);
while ((markdownMatch = markdownRegEx.exec(text)) !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export function entryCreateUpdateScript(contentType) {
text = JSON.stringify(_entry);
}
markdownRegEx = new RegExp(
'(https://(assets|(eu-|azure-na-|azure-eu-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))',
'(https://(assets|(eu-|azure-na-|azure-eu-|gcp-na-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))',
'g',
);
while ((markdownMatch = markdownRegEx.exec(text)) !== null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export function entryUpdateScript(contentType) {
text = JSON.stringify(_entry);
}
markdownRegEx = new RegExp(
'(https://(assets|(eu-|azure-na-|azure-eu-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))',
'(https://(assets|(eu-|azure-na-|azure-eu-|gcp-na-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))',
'g',
);
while ((markdownMatch = markdownRegEx.exec(text)) !== null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@contentstack/cli-audit": "~1.3.2",
"@contentstack/cli-auth": "~1.3.17",
"@contentstack/cli-cm-bootstrap": "~1.7.1",
"@contentstack/cli-cm-branches": "~1.0.20",
"@contentstack/cli-cm-branches": "~1.0.21",
"@contentstack/cli-cm-bulk-publish": "~1.4.0",
"@contentstack/cli-cm-clone": "~1.9.0",
"@contentstack/cli-cm-export": "~1.10.4",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9df4ada

Please sign in to comment.