-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
32 lines (32 loc) · 1.03 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
include .env
reset:
#Delete the relevant section from the .gitmodules file.
/bin/rm -rf .gitmodules
> .gitmodules
#Stage the .gitmodules changes git add .gitmodules
git add .gitmodules
#Delete the relevant section from .git/config.# ^(\[submodule)(.+(\n))+(?=\[) # sed -e "s/^(\[submodule)(.+(\\n))+(?=\[)/gm"
@echo "Delete the relevant section from .git/config"
@/bin/rm .git/config
git init
#Run git rm --cached path_to_submodule
git rm -r --cached ${CODE_PATH} || true
#Run rm -rf .git/modules/path_to_submodule
/bin/rm -rf .git/modules/${CODE_PATH}
#Commit git commit -m "Removed submodule"
git commit -am "Removed submodule"
git reset --hard HEAD~1
#rm -rf path_to_submodule
/bin/rm -rf ${CODE_PATH}
git init
git remote add origin ${GIT_REMOTE_URL}
git pull origin master
init: init-submodule
init-submodule:
git submodule add -b ${BRANCH} -- ${GIT_URL} ${CODE_PATH}
git submodule update --init
cd ${CODE_PATH} && make init
run:
cd ${CODE_PATH} && docker-compose up
build-containers:
cd ${CODE_PATH} && docker-compose build