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

Update workstation scripts to be more broadly useful #64

Merged
merged 25 commits into from
Jun 25, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Purge lib directory
- Remove most opinions about development environment (vim, ruby dev,
  git, GOPATH, etc)
- Limit to dev-machine-agnostic functions for CAPI development
Gerg committed Jun 13, 2024
commit a6cbfa1b03699b2147e32d8889d46723ec8fb45e
22 changes: 0 additions & 22 deletions lib/aliases.bash

This file was deleted.

24 changes: 0 additions & 24 deletions lib/environment-variables.bash

This file was deleted.

26 changes: 0 additions & 26 deletions lib/misc.bash
Original file line number Diff line number Diff line change
@@ -5,17 +5,6 @@
# Luan's vim config, where they can put their custom bits
# -------------------------------------------------------------

# capi likes `alias g="git status"`, other teams like `alias g=git`, so do both:
alias g >/dev/null 2>&1 && unalias g

function g() {
case $# in
0) git status ;;
*) git "$@" ;;
esac
}

# Misc aliases
alias cfu="seed_users"
alias roundup_bosh_lites="print_env_info"
alias bosh_lites="print_env_info"
@@ -35,18 +24,3 @@ function int() {
export CF_INT_API=https://api.$BOSH_LITE_DOMAIN
export CF_INT_PASSWORD=$(credhub get --name '/bosh-lite/cf/cf_admin_password' --output-json | jq -r '.value')
}

function let_me_pull() {
local ssh_url="$(git remote get-url --push origin)"
local https_url="$(echo $ssh_url | awk '{gsub(/[email protected]:/,"https://github.com/")}1')"
if ! echo ${ssh_url} | grep 'git@' > /dev/null; then
echo 'push url doesnt seem to be ssh... exiting without changing anything'
return
fi

echo 'setting fetch to https and push to ssh'
git remote set-url origin "${https_url}"
git remote set-url origin --push "${ssh_url}"
git remote -v
echo 'success!'
}