Commit c7e1aa8 Jacob Woffenden
authored
1 parent 892f65a commit c7e1aa8 Copy full SHA for c7e1aa8
File tree 3 files changed +13
-5
lines changed
features/src/cloud-platform
src/home/vscode/.devcontainer/promptrc.d
3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
9
9
## [ Unreleased]
10
10
11
+ ## [ 0.0.3] - 2024-02-01
12
+
13
+ ### Changed
14
+
15
+ - Removed rogue ` && ` from features/src/cloud-platform/src/home/vscode/.devcontainer/promptrc.d/cloud-platform.sh
16
+
17
+ - Updates logic in Cloud Platform prompt
18
+
11
19
## [ 0.0.2] - 2024-01-31
12
20
13
21
### Added
Original file line number Diff line number Diff line change 1
1
{
2
2
"id" : " cloud-platform" ,
3
- "version" : " 0.0.2 " ,
3
+ "version" : " 0.0.3 " ,
4
4
"name" : " Cloud Platform" ,
5
5
"description" : " Installs the Cloud Platform CLI" ,
6
6
"options" : {
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ PROMPT+='`\
5
5
kubectlCurrentContext=$(kubectl config current-context 2>/dev/null); \
6
6
kubectlCurrentNamespace=$(kubectl config view --minify --output "jsonpath={..namespace}"); \
7
7
kubectlClientId=$(kubectl config view --output json | jq -r ".users[0].user[\"auth-provider\"].config[\"client-id\"]"); \
8
- kubectlServerVersion=$(kubectl version --output json 2>/dev/null | jq -r .serverVersion.gitVersion | sed "s/v//" ); \
9
- && if [[ "${kubectlCurrentContext}" == "cloud-platform-live" ]] && [[ "${kubectlClientId}" == "REPLACE_WITH_CLIENT_ID" ]]; then \
8
+ kubectlServerVersion=$(kubectl version --output json 2>/dev/null | jq -r .serverVersion.gitVersion); \
9
+ if [[ "${kubectlCurrentContext}" == "cloud-platform-live" ]] && [[ "${kubectlClientId}" == "REPLACE_WITH_CLIENT_ID" ]]; then \
10
10
echo -n "[ cluster: %{$fg[yellow]%}${kubectlCurrentContext} (requires authentication)%{$reset_color%} ] "; \
11
- elif [[ "${kubectlCurrentContext}" == "cloud-platform-live" ]] && [[ ! -z "${kubectlServerVersion}" ]]; then \
11
+ elif [[ "${kubectlCurrentContext}" == "cloud-platform-live" ]] && [[ "${kubectlClientId}" != "REPLACE_WITH_CLIENT_ID" ]] && [[ "${kubectlServerVersion}" != "null " ]]; then \
12
12
echo -n "[ cluster: %{$fg[green]%}${kubectlCurrentContext} (authenticated)%{$reset_color%} ] "; \
13
- else
13
+ elif [[ "${kubectlCurrentContext}" == "cloud-platform-live" ]] && [[ "${kubectlClientId}" != "REPLACE_WITH_CLIENT_ID" ]] && [[ "${kubectlServerVersion}" == "null" ]]; then
14
14
echo -n "[ cluster: %{$fg[red]%}${kubectlCurrentContext} (issue with authentication)%{$reset_color%} ] "; \
15
15
fi \
16
16
&& if [[ "${kubectlCurrentContext}" == "cloud-platform-live" ]] && [[ ! -z "${kubectlCurrentNamespace}" ]] && [[ "${kubectlCurrentNamespace}" == *"-prod"* ]]; then \
You can’t perform that action at this time.
0 commit comments