-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clans): add dates to 10 days report
- Loading branch information
1 parent
a7cd08f
commit c570910
Showing
4 changed files
with
54 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# config | ||
BASE_DIR="rp2" | ||
|
||
# ansi | ||
YELLOW='\e[0;33m' | ||
RED='\033[0;31m'; | ||
LIGHT_RED='\033[1;31m'; | ||
GREEN='\033[0;32m'; | ||
LIGHT_GREEN='\033[1;32m'; | ||
NO_COLOR='\033[0m'; |
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,30 @@ | ||
#!/bin/bash | ||
|
||
. scripts/env.sh | ||
|
||
current_directory=$( pwd ); | ||
current_branch=$(git branch --show-current) | ||
|
||
# ===== VALIDATION ===== | ||
|
||
if ! [ "$current_branch" == "dev" ]; then | ||
printf "${YELLOW}The current branch must be dev${NO_COLOR}\n" | ||
printf "${LIGHT_RED}Failed${NO_COLOR}\n" | ||
return | ||
fi | ||
|
||
if ! [[ "$current_directory" == *$BASE_DIR ]]; then | ||
printf "${YELLOW}The current directory must be $BASE_DIR${NO_COLOR}\n" | ||
printf "${LIGHT_RED}Failed${NO_COLOR}\n" | ||
return | ||
fi | ||
|
||
# ===== PROCESS ===== | ||
|
||
git checkout main | ||
git pull origin main | ||
git merge dev | ||
git push origin main | ||
git checkout dev | ||
|
||
printf "${LIGHT_GREEN}Succeed${NO_COLOR}\n" |
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