Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix export.sh #705

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tools/apigee-sackmesser/cmd/export/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ loginfo "exporting to $export_folder"
mkdir -p "$export_folder"

sackmesser list "organizations/$organization/sharedflows" | jq -r -c '.[]|. | select((. | length) > 1)' | while read -r sharedflow; do
# Replacing white Spaces in the sharedflow name with %20
# Replacing white Spaces in the sharedflow name with %20, then removes special characters
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, to be more accurate: "removes whitespace characters"

sharedflow=${sharedflow// /%20}
sharedflow=${sharedflow//[$'\t\r\n']/}
loginfo "download shared flow: $sharedflow"
mkdir -p "$export_folder/sharedflows/$sharedflow"
latest="$(sackmesser list "organizations/$organization/sharedflows/$sharedflow" | jq '.revision | map(tonumber) | max')"
Expand All @@ -62,8 +63,9 @@ sackmesser list "organizations/$organization/sharedflows" | jq -r -c '.[]|. | se
done

sackmesser list "organizations/$organization/apis" | jq -r -c '.[]|.' | while read -r proxy; do
# Replacing white Spaces in the proxy name with %20
# Replacing white Spaces in the proxy name with %20, then removes special characters
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, to be more accurate: "removes whitespace characters"

proxy=${proxy// /%20}
proxy=${proxy//[$'\t\r\n']/}
loginfo "download proxy: $proxy"
mkdir -p "$export_folder/proxies/$proxy"
latest="$(sackmesser list "organizations/$organization/apis/$proxy" | jq '.revision | map(tonumber) | max')"
Expand Down Expand Up @@ -196,4 +198,4 @@ sackmesser list "organizations/$organization/environments" | jq -r -c '.[]|.' |
fi
done

loginfo "Export done - see: $export_folder"
loginfo "Export done - see: $export_folder"
Loading