66 lines
1.5 KiB
Bash
Executable File
66 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# To initialize your development environment,
|
|
# run below command in your terminal:
|
|
# source ./initDev
|
|
|
|
export PROJECT_DIR=$(pwd)
|
|
|
|
alias api="cd $PROJECT_DIR/*-API"
|
|
alias srv="cd $PROJECT_DIR/*-Server"
|
|
|
|
alias c="clear;"
|
|
alias ap="./gradlew --no-rebuild applyPatches"
|
|
alias aap="./gradlew --no-rebuild applyAPIPatches"
|
|
alias agp="./gradlew --no-rebuild applyGeneratedAPIPatches"
|
|
alias asp="./gradlew --no-rebuild applyServerPatches"
|
|
|
|
alias rp="./gradlew --no-rebuild rebuildPatches"
|
|
alias rap="./gradlew --no-rebuild rebuildAPIPatches"
|
|
alias rgp="./gradlew --no-rebuild rebuildGeneratedAPIPatches"
|
|
alias rsp="./gradlew --no-rebuild rebuildServerPatches"
|
|
|
|
alias lg="git log --oneline base..HEAD"
|
|
alias rc="git rebase --autosquash -i base"
|
|
alias rcc="git rebase --continue"
|
|
|
|
# generate Fixup patches for Server
|
|
function fs() {
|
|
cd ./*-Server || exit 1
|
|
garg="."
|
|
[[ "$1" == "-x" ]] && garg="--amend"
|
|
|
|
git add .
|
|
git commit "$garg" -m "fixup"
|
|
git format-patch -1
|
|
mv 0001-fixup.patch ../
|
|
|
|
cd ../
|
|
}
|
|
|
|
# generate Fixup patches for API
|
|
function fa() {
|
|
cd ./*-API || exit 1
|
|
garg="."
|
|
[[ "$1" == "-x" ]] && garg="--amend"
|
|
|
|
git add .
|
|
git commit "$garg" -m "fixup"
|
|
git format-patch -1
|
|
mv 0001-fixup.patch ../
|
|
|
|
cd ../
|
|
}
|
|
|
|
# ReApply Server Patches
|
|
function rasp() {
|
|
rm -rf ./*-Server
|
|
./gradlew applyServerPatches
|
|
}
|
|
|
|
# Commit Updated Upstream
|
|
function cuu() {
|
|
# shellcheck disable=SC2059
|
|
printf "Updated Upstream ($1)$(/bin/cat compare.txt)" | git commit -F -
|
|
}
|
|
|