- Shell plugin with aliases and functions to speed up
oclogins and token renewal. - Works with both Zsh and Bash.
- ⏱️ Time: 10 seconds
- 🖱️ Clicks: 2
- ⏱️ Time: 30 seconds
- 🖱️ Clicks: 8
- Clone zoc to your plugin directory:
git clone https://github.com/TomerG2/zoc ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zoc- Add to your
~/.zshrc:
plugins+=(zoc)- Restart your shell:
exec zsh- Clone zoc to a directory of your choice:
git clone https://github.com/TomerG2/zoc ~/.zoc- Add to your
~/.bashrcor~/.bash_profile:
source ~/.zoc/zoc.sh- Restart your shell or run:
source ~/.bashrc # or ~/.bash_profile- Clone zoc to a directory of your choice:
git clone https://github.com/TomerG2/zoc ~/.zoc- Add to your
~/.zshrc:
source ~/.zoc/zoc.sh- Restart your shell:
exec zshoclog <alias> <api-server> <namespace>→ logs you in with a short alias and optional namespace.ocen→ checks if your oc login has expired and refreshes the token if it has.ocp→ combines ocensure && oc.
oclogin dev https://your-openshift-api-server:6443 my-namespace
# Creates a new context with the alias "dev", setting ns to "my-namespace"
ocen
# Check if the token has expired and refreshes it if needed
ocp get pods
# Refreshes token if needed and exec "oc get pods"The release process is split into two phases for better control and transparency:
Before merging your changes, bump the version numbers in your PR:
./scripts/bump-version.sh 1.2.0This updates version numbers in zoc.sh and README.md. Commit these changes as part of your PR so reviewers can see what version is being released.
After your PR is merged to main, create the actual release:
Option A: Manual Script
./scripts/create-release.sh 1.2.0 "Added new features"Option B: GitHub Actions (Recommended)
- Go to Actions > Release > Run workflow
- Enter the same version number used in Phase 1
- The workflow will verify version consistency and create the release automatically
The release process will fail if the version in files doesn't match the requested release version, ensuring consistency.