Skip to content
Commits on Source (6)
......@@ -3,7 +3,23 @@
export TF_CLI=tofu
export TF_DEBUG=1
alias tfa='tf apply tfplan && tf apply -auto-approve -refresh-only'
alias tfa='tf apply tfplan'
alias tfaa='tf apply -auto-approve'
alias tfar='tf apply tfplan && tf plan -out tfplan -refresh-only && tf apply tfplan'
alias tfp='tf init -backend=false && tf plan -out tfplan'
alias tfr='tf apply -auto-approve -refresh-only'
alias tfvf='tf init -backend=false && tf validate && tf fmt -diff'
tfp-next () {
current="$(tf workspace show)"
next="$(tf workspace list | cut -c3- | grep --line-regexp --after-context=1 "$current" | tail +2)"
tf apply tfplan
tf apply -auto-approve -refresh-only
if [ -z "$next" ]
then
red "Last workspace in the cycle."
return
fi
tf workspace select "$next"
tf plan -out tfplan "$@"
}
......@@ -5,17 +5,18 @@
whitespace = fix
[alias]
exec = "!${SHELL:-/bin/sh} -ic "
Pull = pull --progress --ff --tags
amend = commit --amend
autorebase = -c 'core.editor=true' rebase -i --autosquash --autostash
bull = submodule update --remote --init
cdif = diff --cached --color-words
cdiff = diff --cached
cleaan = clean -dX
cleaaan = clean -dx
cleaan = clean -dX
default-branch = name-rev --name-only origin/HEAD
dif = diff --color-words --ignore-all-space
empty-commit = commit --allow-empty
exec = "!${SHELL:-/bin/sh} -ic "
ff = merge --no-edit --ff-only
fixup = !cd "${GIT_PREFIX:-$PWD}" && git commit --fixup $(git last-commit)
forget = reset HEAD^
......@@ -25,7 +26,6 @@
pop = stash pop
posh = push --set-upstream origin HEAD
pre-commit = ! pre-commit run --files $(git uncommitted)
Pull = pull --progress --ff --tags
pull-force = !git fetch && git reset --hard "$(git tracking)"
pushes = !git remote | xargs -n1 git push
retry = !cd "${GIT_PREFIX:-$PWD}" && git amend --no-edit . && git shove
......@@ -35,8 +35,8 @@
serve-http = !git update-server-info && cd .git && python -m http.server 8080
shove = push --force-with-lease
squash = !cd "${GIT_PREFIX:-$PWD}" && git commit --squash $(git last-commit)
staash = stash push --include-untracked
staaash = stash push --all --include-untracked
staash = stash push --include-untracked
stat = status --short --branch
tag-version = !git tag --annotate --force --message "v$(cat VERSION)" "v$(cat VERSION)"
temptree = !git worktree prune && git worktree add "$(mktemp -d)"
......@@ -73,15 +73,15 @@
defaultBranch = master
[merge]
tool = meld
ff = false
tool = meld
[notes]
rewriteRef = refs/notes/commits
[push]
followTags = true
default = simple
followTags = true
[rebase]
autoSquash = true
......@@ -99,6 +99,6 @@
pushInsteadOf = "https://github.com/"
[user]
name = Adar Nimrod
email = nimrod@shore.co.il
name = Adar Nimrod
signingKey = A322378C61339ECD
......@@ -43,4 +43,4 @@ export AWS_SESSION_TOKEN
unset AWS_SECURITY_TOKEN
eval exec "$@"
exec "$@"
......@@ -9,5 +9,7 @@ export AWS_PROFILE=schoolinks
export COMPOSE_FILE='docker-compose.local.yml'
export GIT_AUTHOR_EMAIL='nimrod@schoolinks.com'
export GIT_AUTHOR_NAME='Nimrod Adar'
PATH="$PATH:$(dirname "$(command -v python3)")/../installs/python/$(python3 --version | awk '{print $2}')/bin"
export PATH
export PIPENV_VENV_IN_PROJECT=1
source_env_if_exists .envrc.private
export BW_CLIENTID='{{ run(["ph", "show", "--field", "OAuth client ID", "SchooLinks/Bitwarden"])["stdout"] }}'
export BW_CLIENTSECRET='{{ run(["ph", "show", "--field", "OAuth client secret", "SchooLinks/Bitwarden"])["stdout"] }}'
export CHROMATIC_PROJECT_TOKEN='{{ run(["ph", "show", "--field", "Token", "SchooLinks/Chromatic"])["stdout"] }}'
export SOPS_KMS_ARN='{{ run(["ph", "show", "--field", "ARN", "SchooLinks/SOPS KMS key"])["stdout"] }}'