-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
242 additions
and
779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
source $HOME/.poetry/env | ||
export ASDF_DIR=/usr/local/opt/asdf/libexec | ||
export ASDF_DIR=/opt/homebrew/opt/asdf/libexec | ||
export ASDF_DATA_DIR=$HOME/Library/asdf | ||
source "$HOME/.cargo/env" | ||
export PATH=~/Library/asdf/shims:~/.local/bin:/usr/local/bin:$PATH | ||
export PATH=~/Library/asdf/shims:~/.local/bin:/opt/homebrew/bin:$PATH | ||
if [ -e /Users/leigh/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/leigh/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer | ||
. "$HOME/.cargo/env" | ||
eval "$(direnv hook zsh)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-----BEGIN PUBLIC KEY----- | ||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1S/9jvKC/WLtJ/u8yu1U | ||
mfBMQasrJOIsn6EMGCG+qre2Xa3lVGqsLglX0z4cFUQel8HgjQEqODifj9QSTs0f | ||
Xv8eENO2SXOP7ibz6rNOQem/1aI2Pa1AsOE9UUzHutk8mu9wrTZ8wq/Oiu4y607Y | ||
eGtrY7P+VtCX06grOGy1yPJVT3rkRR4BEhwWdAFErjwwf6lsI4YjQbJG+wKP6z2q | ||
jlNuYVi5VZmFvT/ECMnRwhqAKVrYvVoWV4YlgaKNnBK0d9Ihi3jdVf2YYgpVYTOD | ||
Y2/o22lno9RL2t1OZ0KODTlvNyy6KHGUkmNTDCeHkwg+XWpozKjQNdkzIeTofBJ1 | ||
qQIDAQAB | ||
-----END PUBLIC KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
import subprocess | ||
|
||
if subprocess.run(('git', 'show-ref', '--verify', '--quiet', 'refs/heads/main'), stdout=subprocess.DEVNULL).returncode == 0: | ||
main_branch = 'main' | ||
else: | ||
main_branch = 'master' | ||
|
||
merge_base = subprocess.run(('git', 'merge-base', main_branch, 'HEAD'), stdout=subprocess.PIPE, encoding='utf8').stdout.strip() | ||
print(subprocess.run(('git', 'diff', '--shortstat', merge_base), stdout=subprocess.PIPE, encoding='utf8').stdout) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
from pathlib import Path | ||
from os.path import commonpath | ||
from subprocess import check_output, check_call | ||
from pathlib import Path | ||
from subprocess import check_call, check_output | ||
|
||
WORK_DIR = Path.home() / "Octopus" | ||
WORK_EMAIL = "daisy.brenecki@octopus.energy" | ||
|
||
WORK_DIR = Path.home() / 'CMV' | ||
WORK_EMAIL = 'leigh.brenecki@cmv.com.au' | ||
|
||
def is_parent(alleged_parent, alleged_child): | ||
return commonpath((alleged_parent.resolve(),)) == commonpath((alleged_parent.resolve(), alleged_child.resolve())) | ||
return commonpath((alleged_parent.resolve(),)) == commonpath( | ||
(alleged_parent.resolve(), alleged_child.resolve()) | ||
) | ||
|
||
|
||
if is_parent(Path.home() / 'CMV', Path.cwd()): | ||
if check_output(('git', 'config', 'user.email')) != WORK_EMAIL.encode('utf8') + b'\n': | ||
if is_parent(WORK_DIR, Path.cwd()): | ||
if ( | ||
check_output(("git", "config", "user.email")) | ||
!= WORK_EMAIL.encode("utf8") + b"\n" | ||
): | ||
print(f"Setting user email to {WORK_EMAIL}") | ||
check_call(('git', 'config', 'user.email', WORK_EMAIL)) | ||
check_call(("git", "config", "user.email", WORK_EMAIL)) |
Oops, something went wrong.