Merge pull request #4 from berttty/main
Incremental update
diff --git a/Gemfile b/Gemfile
index 205a395..dfe83cd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -30,4 +30,5 @@
gem 'jekyll-asciidoc', '~> 2.1.1'
end
-gem "html-proofer"
+# TODO: check if used if not need to be deleted
+#gem "html-proofer"
diff --git a/script/cibuild b/script/cibuild
index 49a7943..cf2f1f9 100644
--- a/script/cibuild
+++ b/script/cibuild
@@ -39,22 +39,31 @@
mkdir -p ../tmp
mv ./_site/* ../tmp
+rm -rf ../tmp/script
cp DISCLAIMER ../tmp
cp LICENSE.TXT ../tmp
cp NOTICE.TXT ../tmp
+cp .gitignore ../tmp
+cp .asf.yaml ../tmp
-git checkout --orphan ${BRANCH_PAGE}
-rm -rf ./*
+#git pull origin ${BRANCH_PAGE} --allow-unrelated-histories
+#git checkout ${BRANCH_PAGE}
-mv ../tmp/* ./
+REPO_URL=$(git remote get-url origin)
+git clone --depth=50 --branch=${BRANCH_PAGE} ${REPO_URL} ../${BRANCH_PAGE}
+
+cd ../${BRANCH_PAGE}
+#delete the old file that it was not gerenated
+rm -rf $(diff --exclude=".git" --exclude="./docs" -q ../tmp/ ./ | awk '/Only in \.\//{print substr($3, 1, length($3)-1) "" $4}')
+
+rsync -av ../tmp/* ./
+cp ../tmp/.gitignore ./
+cp ../tmp/.asf.yaml ./
git add -A
git status
git commit -m "Lastest site built on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to github"
git remote set-url origin https://${USER}:${TOKEN}@github.com/${TRAVIS_REPO_SLUG}
-git push origin --delete ${BRANCH_PAGE}
git push origin ${BRANCH_PAGE}:${BRANCH_PAGE}
-git push origin --delete gh-pages
-git push origin ${BRANCH_PAGE}:gh-pages