Skip to content

Commit

Permalink
feat: migrate to zsh from bash
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatamutyala authored Mar 27, 2024
1 parent 5286439 commit 5a8811e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ RUN curl -Lo /usr/local/bin/kubectl https://dl.k8s.io/release/v${VERSION_KUBECTL
&& tar -xvf helm.tar.gz \
&& mv linux-amd64/helm /usr/local/bin \
&& rm -rf linux-amd64 helm.tar.gz \
&& curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v${VERSION_K3D} bash
&& curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v${VERSION_K3D} zsh


ENV CLOUDSDK_COMPONENT_MANAGER_FIXED_SDK_VERSION=${VERSION_GCLOUD_SDK}
# Below includes cleanup to save space after the gcloud install: https://stackoverflow.com/questions/60827959/how-to-stop-gcloud-component-update-from-keeping-a-backup
RUN curl -sSL https://sdk.cloud.google.com | bash \
RUN curl -sSL https://sdk.cloud.google.com | zsh \
&& export PATH=$PATH:/usr/local/gcloud/google-cloud-sdk/bin \
&& gcloud components install gke-gcloud-auth-plugin --quiet \
&& gcloud components install alpha --quiet \
Expand Down
4 changes: 1 addition & 3 deletions .devcontainer/tools/add-tools-to-shells.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash
#!/bin/zsh

add_tools_to_shells() {
if [ -f "/home/vscode/.bashrc" ]; then
find /etc/tools/ -type f ! -name "add-tools-to-shells.sh" ! -name "helm-repositories.yaml" \
-exec sh -c 'echo >> /home/vscode/.bashrc; cat "{}" >> /home/vscode/.bashrc' \;
echo "zsh" >> /home/vscode/.bashrc
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/zsh

cordon-drain-nodes-older-than-minutes() {
threshold_minutes=""
Expand Down
3 changes: 2 additions & 1 deletion .devcontainer/tools/create-ghcr-regcred.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/zsh

create-ghcr-regcred() {
gh_username=""
gh_token=""
Expand Down Expand Up @@ -40,7 +42,6 @@ create-ghcr-regcred() {
return
fi

set -e
b64_enc_regcred=$(echo -n "$gh_username:$gh_token" | base64)

echo "{\"auths\":{\"ghcr.io\":{\"auth\":\"$b64_enc_regcred\"}}}"
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/tools/glueops-fetch-repos.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/zsh

glueops-fetch-repos() {
#https://stackoverflow.com/a/68770988/4620962

Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/tools/run-gha.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/zsh

run-gha() {
#https://stackoverflow.com/questions/6245570/how-do-i-get-the-current-branch-name-in-git
gh workflow run --ref=$(git rev-parse --abbrev-ref HEAD)
Expand Down
2 changes: 2 additions & 0 deletions .devcontainer/tools/yolo.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/zsh

yolo() {
# Always unset GITHUB_TOKEN
unset GITHUB_TOKEN
Expand Down

0 comments on commit 5a8811e

Please sign in to comment.