You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by rl...@apache.org on 2019/07/12 17:52:16 UTC
[celix-site] 25/34: Updated publish script to be able to specify
git remote
This is an automated email from the ASF dual-hosted git repository.
rlenferink pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/celix-site.git
commit 8a51e11fa8a0e26bcc8b36c39e401d846b4fa666
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Sun Jul 7 13:08:04 2019 +0200
Updated publish script to be able to specify git remote
---
publish.sh | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/publish.sh b/publish.sh
index 37e1414..62fbb72 100644
--- a/publish.sh
+++ b/publish.sh
@@ -17,6 +17,17 @@
# A script to build the Celix site (based on Hugo)
+# Input parameters
+GIT_REMOTE=$1
+if [[ -z "${GIT_REMOTE}" ]]; then
+ echo "Git remote is not specified!"
+ echo "Usage:"
+ echo " ./publish.sh <remote>"
+ echo " e.g."
+ echo " ./publish.sh origin"
+ exit 1
+fi
+
# specify source and site branches
SOURCE="master"
SITE="asf-site"
@@ -60,7 +71,7 @@ git commit -m "${message}" > /dev/null 2>&1
rm -rf ${tmp_dir}
# Push the SOURCE to the server
-git push -u origin ${SOURCE} > /dev/null 2>&1
+git push -u ${GIT_REMOTE} ${SOURCE} > /dev/null 2>&1
if [ $? = 0 ]; then
echo "Push ${SOURCE} successful"
else
@@ -68,7 +79,7 @@ else
fi
# Push the SITE to the server
-git push -u origin ${SITE} > /dev/null 2>&1
+git push -u ${GIT_REMOTE} ${SITE} > /dev/null 2>&1
if [ $? = 0 ]; then
echo "Push ${SITE} successful"
else