Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
47 changes: 10 additions & 37 deletions codemods/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions dotenv/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ZSH_THEME="avit"
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git docker node npm z zsh-nvm zsh-autosuggestions zsh-syntax-highlighting)
plugins=(git docker node npm z zsh-autosuggestions zsh-syntax-highlighting)

source $ZSH/oh-my-zsh.sh

Expand All @@ -23,7 +23,3 @@ eval $(thefuck --alias)

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
1 change: 1 addition & 0 deletions dotenv/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ brew upgrade
brew install --cask iterm2

## dev tools
brew install git
brew install git-lfs
brew install --cask visual-studio-code
brew install thefuck
Expand Down
15 changes: 15 additions & 0 deletions dotenv/server_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# thefuck
sudo apt update
sudo apt install python3-dev python3-pip python3-setuptools
pip3 install thefuck --user

# ohmyzsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## plugins
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting


# apply configs to $HOME
CURRENT_DIR=$(dirname "$0")
/bin/cp $CURRENT_DIR/.zshenv .zshrc $HOME/
21 changes: 21 additions & 0 deletions pull-requester/commit-and-raise-pr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
BRANCH_NAME=""
COMMIT_MSG=""
PR_BODY=""

commit_and_push () {
git add -A
git commit -m "$COMMIT_MSG"

git push -u origin $BRANCH_NAME
}

raise_pr () {
gh pr create --title "$COMMIT_MSG" --body "$PR_BODY"
}

main () {
commit_and_push
raise_pr
}

main
41 changes: 41 additions & 0 deletions pull-requester/create-branch-and-upgrade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
BRANCH_NAME=""
DEPENDENCIES=()

prune () {
git checkout main
bash ../utils/git/prune.sh
}

pull_and_checkout () {
git checkout main
git pull

git checkout -b "$BRANCH_NAME"
}

upgrade_dependencies () {
yarn

for dependency in ${DEPENDENCIES[*]}
do
echo "Upgrading $dependency"
if grep -R "$dependency" "package.json"
then
yarn upgrade $dependency --latest
fi
done
}

open_code () {
code .
}


main () {
prune
pull_and_checkout
open_code
upgrade_dependencies
}

main
25 changes: 25 additions & 0 deletions pull-requester/upgrade-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
REPOS=()

source commit-and-raise-pr.sh
source create-branch-and-upgrade.sh


for repo in ${REPOS[*]}
do
echo ------------
echo Repo: $repo
echo ------------

git clone "https://github.com/$repo.git"
cd $repo


prune

pull_and_checkout
upgrade_dependencies
commit_and_push
raise_pr

cd ..
done