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/01/02 19:59:12 UTC

[celix-site] 02/12: CELIX-449: Correcting line-endings for file

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 746819614158d49300ce15ab4584fd555b1a9bfa
Author: Roy Lenferink <rl...@apache.org>
AuthorDate: Sat Dec 29 13:57:58 2018 +0100

    CELIX-449: Correcting line-endings for file
---
 publish.sh | 158 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 79 insertions(+), 79 deletions(-)

diff --git a/publish.sh b/publish.sh
index d11e82e..01eddd0 100644
--- a/publish.sh
+++ b/publish.sh
@@ -1,79 +1,79 @@
-#!/usr/bin/env bash
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# A script to build the Celix site (based on jekyll)
-
-# specify source and site branches
-SOURCE="master"
-SITE="asf-site"
-
-# Make sure the SOURCE branch is active
-git checkout ${SOURCE} > /dev/null 2>&1
-
-# Get the latest commit SHA in SOURCE branch
-last_SHA=( $(git log -n 1 --pretty=format:"%H") )
-
-# use last commit sha as temp folder name
-tmp_dir=`mktemp -d`
-out_dir=${tmp_dir}/content
-mkdir -p ${out_dir}
-
-# Build the Jekyll site  to our temporary folder
-bundle exec jekyll build -d ${out_dir} > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "Jekyll build successful"
-else
-  echo "Jekyll build failed"
-  exit 1
-fi
-
-# Switch to the SITE branch
-git checkout ${SITE} > /dev/null 2>&1
-
-# Remove the current contents of the SITE branch and replace them with the contents of the temp folder
-current_dir=${PWD}
-rm -rf ${current_dir}/*
-git rm -r --cached content/* > /dev/null 2>&1
-mkdir -p ${current_dir}/content
-cp -r ${tmp_dir}/* ${current_dir}/content
-
-# Commit the changes to the SITE branch
-message="Updated site from ${SOURCE} (${last_SHA})"
-git add -A
-git commit -m "${message}" > /dev/null 2>&1
-
-# Delete the temporary folder
-rm -rf ${tmp_dir}
-
-# Push latest SITE to server
-git push -u origin ${SITE} > /dev/null 2>&1
-if [ $? = 0 ]; then
-  echo "Push ${SITE} successful"
-else
-  echo "Push ${SITE} failed"
-fi
-
-# Switch back to SOURCE branch
-git checkout ${SOURCE} > /dev/null 2>&1
-
-# Push the SOURCE to the server
-git push -u origin ${SOURCE} > /dev/null 2>&1
-if [ $? = 0 ]; then
- echo "Push ${SOURCE} successful"
-else
- echo "Push ${SOURCE} failed"
-fi
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# A script to build the Celix site (based on jekyll)
+
+# specify source and site branches
+SOURCE="master"
+SITE="asf-site"
+
+# Make sure the SOURCE branch is active
+git checkout ${SOURCE} > /dev/null 2>&1
+
+# Get the latest commit SHA in SOURCE branch
+last_SHA=( $(git log -n 1 --pretty=format:"%H") )
+
+# use last commit sha as temp folder name
+tmp_dir=`mktemp -d`
+out_dir=${tmp_dir}/content
+mkdir -p ${out_dir}
+
+# Build the Jekyll site  to our temporary folder
+bundle exec jekyll build -d ${out_dir} > /dev/null 2>&1
+if [ $? = 0 ]; then
+  echo "Jekyll build successful"
+else
+  echo "Jekyll build failed"
+  exit 1
+fi
+
+# Switch to the SITE branch
+git checkout ${SITE} > /dev/null 2>&1
+
+# Remove the current contents of the SITE branch and replace them with the contents of the temp folder
+current_dir=${PWD}
+rm -rf ${current_dir}/*
+git rm -r --cached content/* > /dev/null 2>&1
+mkdir -p ${current_dir}/content
+cp -r ${tmp_dir}/* ${current_dir}/content
+
+# Commit the changes to the SITE branch
+message="Updated site from ${SOURCE} (${last_SHA})"
+git add -A
+git commit -m "${message}" > /dev/null 2>&1
+
+# Delete the temporary folder
+rm -rf ${tmp_dir}
+
+# Push latest SITE to server
+git push -u origin ${SITE} > /dev/null 2>&1
+if [ $? = 0 ]; then
+  echo "Push ${SITE} successful"
+else
+  echo "Push ${SITE} failed"
+fi
+
+# Switch back to SOURCE branch
+git checkout ${SOURCE} > /dev/null 2>&1
+
+# Push the SOURCE to the server
+git push -u origin ${SOURCE} > /dev/null 2>&1
+if [ $? = 0 ]; then
+ echo "Push ${SOURCE} successful"
+else
+ echo "Push ${SOURCE} failed"
+fi