Working Git scripts
This commit is contained in:
4
pull
4
pull
@@ -3,15 +3,11 @@
|
|||||||
if [ -z "$GIT_EMAIL" ]; then
|
if [ -z "$GIT_EMAIL" ]; then
|
||||||
echo "You need to pass the \$GIT_EMAIL variable to the container for this to work"
|
echo "You need to pass the \$GIT_EMAIL variable to the container for this to work"
|
||||||
exit
|
exit
|
||||||
else
|
|
||||||
echo $GIT_EMAIL
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$GIT_NAME" ]; then
|
if [ -z "$GIT_NAME" ]; then
|
||||||
echo "You need to pass the \$GIT_NAME variable to the container for this to work"
|
echo "You need to pass the \$GIT_NAME variable to the container for this to work"
|
||||||
exit
|
exit
|
||||||
else
|
|
||||||
echo $GIT_NAME
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /usr/share/nginx/html
|
cd /usr/share/nginx/html
|
||||||
|
|||||||
1
push
1
push
@@ -18,3 +18,4 @@ ts=$(timestamp)
|
|||||||
cd /usr/share/nginx/html
|
cd /usr/share/nginx/html
|
||||||
git add *
|
git add *
|
||||||
git commit -a -m "push from container $ts"
|
git commit -a -m "push from container $ts"
|
||||||
|
git push
|
||||||
|
|||||||
1
start.sh
1
start.sh
@@ -11,6 +11,7 @@ if [ ! -z "$GIT_EMAIL" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ ! -z "$GIT_NAME" ]; then
|
if [ ! -z "$GIT_NAME" ]; then
|
||||||
git config --global user.name "$GIT_NAME"
|
git config --global user.name "$GIT_NAME"
|
||||||
|
git config --global push.default simple
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pull down code form git for our site!
|
# Pull down code form git for our site!
|
||||||
|
|||||||
Reference in New Issue
Block a user