Messing with the remotes and resetting branches in the build script
feels a bit icky.

Would an alternative be to just move the src dir into the asf-site
branch, so all the branch swapping and updating hoop jumping (and time
spent waiting on it) is eliminated? To update the site you would then
just make a source change or 10, optionally committing those only, and
at the end build (only build, no branch/commit/fetch hoop jumping),
commit, and push. Thats what we do at Qpid and what I've seen other
projects do, I find it simpler overall.

Robbie

On Wed, 2 Oct 2019 at 14:27, <clebertsuco...@apache.org> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> clebertsuconic pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/activemq-website.git
>
> commit ff6dec7412d49a0060932a54afbd656a3f7df5db
> Author: Clebert Suconic <clebertsuco...@apache.org>
> AuthorDate: Wed Oct 2 09:19:39 2019 -0400
>
>     Adding upstream checkout on build.sh
> ---
>  build.sh | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/build.sh b/build.sh
> index 1bcff33..9794d2d 100755
> --- a/build.sh
> +++ b/build.sh
> @@ -4,11 +4,15 @@ jekyll build -s ./src/ -d ./site-content
>  COMMIT_HASH=`git rev-parse HEAD`
>  COMMIT_MESSAGE=`git show -s --format=%s HEAD`
>
> +git remote add github-upstream https://github.com/apache/activemq-website.git
> +
>  echo "Build of ActiveMQ site successful."
> -git checkout asf-site
> +git fetch github-upstream
> +git checkout github-upstream/asf-site -B asf-site
>  rm -rf content
>  mv site-content content
>  git add content
> +git remote remove github-upstream
>
>  echo "Commiting changes to asf-site branch from master branch."
>  git commit --author "ActiveMQ Dev <dev@activemq.apache.org>" -m 
> "$COMMIT_MESSAGE / built from commit $COMMIT_HASH"
>

Reply via email to