ClickHouse/docs/tools/release.sh

65 lines
1.9 KiB
Bash
Raw Normal View History

CLICKHOUSE-2724: website refactoring (#668) * Split website and doc * Add Host directive to robots.txt * Make new favicon.ico from svg * Reformat code * Add some obscurity to email to limit it's inclusion to email spam databases * Mention SQL in descriptions * Put logo near main title * Add navbar * Update feedback text on tutorial page * Reformat code on tutorial page * Better inline svg * Move javascript to bottom in reference * Mark external links on main & tutorial * Copy footer from main to tutorial * Move Telegram higher * Get rid of hidden content * Update jQuery + add it on index * Rewrite plain JS with jQuery on index * Swap Contacts and Download * Some title tuning * Move Source link to corner * Slow scroll * New first screen * First screen tuning * Add github pages script * Checkout in proper place * more nofollow * Basic mobile support * Add some temporary icon (SIL licensed) * Fix horizontal scroll on mobile * Re-order paragraphs * Sync paragraphs with their index * Add one more grey block * Fix scroll to top * better offset * Reformat code * Add social paragraph * Better word * Font tuning * More font/offset tuning * Increase navbar padding * Basic minify & livereload via gulp * Add styles to default in gulp * Do not minify html in reference * Add og:image header * "build" gulp target * Add readme for website * Max-width for navbar * Use different placeholder * Tune some margins * Do not center buttons * Tune navbar padding * s/an/a/ * Larger font at logo * Increase padding at hero * Yet another placeholder + tune padding on buttons * Basic support for website inside Docker * Listen for IPv6 inside Docker * s/available/enabled/g * nginx tuning * add gzip_min_length * not so dark "fork me" badge * do not commit build results * move "fork me" to right side * Tune styles and texts * tune mobile version * text fix * text fix * text fix * publish presentations * fix navbar styling * fix id name * Support actual deployment to either prod and test * tune logo margin * Mention ClickHouse Docker images * style tuning * disable mix-blend-mode on mobile * copy robots.txt
2017-04-10 14:24:53 +00:00
#!/usr/bin/env bash
set -ex
CLICKHOUSE-2724: website refactoring (#668) * Split website and doc * Add Host directive to robots.txt * Make new favicon.ico from svg * Reformat code * Add some obscurity to email to limit it's inclusion to email spam databases * Mention SQL in descriptions * Put logo near main title * Add navbar * Update feedback text on tutorial page * Reformat code on tutorial page * Better inline svg * Move javascript to bottom in reference * Mark external links on main & tutorial * Copy footer from main to tutorial * Move Telegram higher * Get rid of hidden content * Update jQuery + add it on index * Rewrite plain JS with jQuery on index * Swap Contacts and Download * Some title tuning * Move Source link to corner * Slow scroll * New first screen * First screen tuning * Add github pages script * Checkout in proper place * more nofollow * Basic mobile support * Add some temporary icon (SIL licensed) * Fix horizontal scroll on mobile * Re-order paragraphs * Sync paragraphs with their index * Add one more grey block * Fix scroll to top * better offset * Reformat code * Add social paragraph * Better word * Font tuning * More font/offset tuning * Increase navbar padding * Basic minify & livereload via gulp * Add styles to default in gulp * Do not minify html in reference * Add og:image header * "build" gulp target * Add readme for website * Max-width for navbar * Use different placeholder * Tune some margins * Do not center buttons * Tune navbar padding * s/an/a/ * Larger font at logo * Increase padding at hero * Yet another placeholder + tune padding on buttons * Basic support for website inside Docker * Listen for IPv6 inside Docker * s/available/enabled/g * nginx tuning * add gzip_min_length * not so dark "fork me" badge * do not commit build results * move "fork me" to right side * Tune styles and texts * tune mobile version * text fix * text fix * text fix * publish presentations * fix navbar styling * fix id name * Support actual deployment to either prod and test * tune logo margin * Mention ClickHouse Docker images * style tuning * disable mix-blend-mode on mobile * copy robots.txt
2017-04-10 14:24:53 +00:00
BASE_DIR=$(dirname $(readlink -f $0))
BUILD_DIR="${BASE_DIR}/../build"
PUBLISH_DIR="${BASE_DIR}/../publish"
GIT_TEST_URI="git@github.com:ClickHouse/clickhouse-test.github.io.git"
GIT_PROD_URI="git@github.com:ClickHouse/clickhouse.github.io.git"
CLICKHOUSE-2724: website refactoring (#668) * Split website and doc * Add Host directive to robots.txt * Make new favicon.ico from svg * Reformat code * Add some obscurity to email to limit it's inclusion to email spam databases * Mention SQL in descriptions * Put logo near main title * Add navbar * Update feedback text on tutorial page * Reformat code on tutorial page * Better inline svg * Move javascript to bottom in reference * Mark external links on main & tutorial * Copy footer from main to tutorial * Move Telegram higher * Get rid of hidden content * Update jQuery + add it on index * Rewrite plain JS with jQuery on index * Swap Contacts and Download * Some title tuning * Move Source link to corner * Slow scroll * New first screen * First screen tuning * Add github pages script * Checkout in proper place * more nofollow * Basic mobile support * Add some temporary icon (SIL licensed) * Fix horizontal scroll on mobile * Re-order paragraphs * Sync paragraphs with their index * Add one more grey block * Fix scroll to top * better offset * Reformat code * Add social paragraph * Better word * Font tuning * More font/offset tuning * Increase navbar padding * Basic minify & livereload via gulp * Add styles to default in gulp * Do not minify html in reference * Add og:image header * "build" gulp target * Add readme for website * Max-width for navbar * Use different placeholder * Tune some margins * Do not center buttons * Tune navbar padding * s/an/a/ * Larger font at logo * Increase padding at hero * Yet another placeholder + tune padding on buttons * Basic support for website inside Docker * Listen for IPv6 inside Docker * s/available/enabled/g * nginx tuning * add gzip_min_length * not so dark "fork me" badge * do not commit build results * move "fork me" to right side * Tune styles and texts * tune mobile version * text fix * text fix * text fix * publish presentations * fix navbar styling * fix id name * Support actual deployment to either prod and test * tune logo margin * Mention ClickHouse Docker images * style tuning * disable mix-blend-mode on mobile * copy robots.txt
2017-04-10 14:24:53 +00:00
if [[ -z "$1" ]]
then
TAG=$(head -c 8 /dev/urandom | xxd -p)
else
TAG="$1"
fi
DOCKER_HASH="$2"
CLICKHOUSE-2724: website refactoring (#668) * Split website and doc * Add Host directive to robots.txt * Make new favicon.ico from svg * Reformat code * Add some obscurity to email to limit it's inclusion to email spam databases * Mention SQL in descriptions * Put logo near main title * Add navbar * Update feedback text on tutorial page * Reformat code on tutorial page * Better inline svg * Move javascript to bottom in reference * Mark external links on main & tutorial * Copy footer from main to tutorial * Move Telegram higher * Get rid of hidden content * Update jQuery + add it on index * Rewrite plain JS with jQuery on index * Swap Contacts and Download * Some title tuning * Move Source link to corner * Slow scroll * New first screen * First screen tuning * Add github pages script * Checkout in proper place * more nofollow * Basic mobile support * Add some temporary icon (SIL licensed) * Fix horizontal scroll on mobile * Re-order paragraphs * Sync paragraphs with their index * Add one more grey block * Fix scroll to top * better offset * Reformat code * Add social paragraph * Better word * Font tuning * More font/offset tuning * Increase navbar padding * Basic minify & livereload via gulp * Add styles to default in gulp * Do not minify html in reference * Add og:image header * "build" gulp target * Add readme for website * Max-width for navbar * Use different placeholder * Tune some margins * Do not center buttons * Tune navbar padding * s/an/a/ * Larger font at logo * Increase padding at hero * Yet another placeholder + tune padding on buttons * Basic support for website inside Docker * Listen for IPv6 inside Docker * s/available/enabled/g * nginx tuning * add gzip_min_length * not so dark "fork me" badge * do not commit build results * move "fork me" to right side * Tune styles and texts * tune mobile version * text fix * text fix * text fix * publish presentations * fix navbar styling * fix id name * Support actual deployment to either prod and test * tune logo margin * Mention ClickHouse Docker images * style tuning * disable mix-blend-mode on mobile * copy robots.txt
2017-04-10 14:24:53 +00:00
if [[ -z "$1" ]]
then
source "${BASE_DIR}/venv/bin/activate"
python "${BASE_DIR}/build.py" "--enable-stable-releases"
rm -rf "${PUBLISH_DIR}" || true
git clone "${GIT_TEST_URI}" "${PUBLISH_DIR}"
cd "${PUBLISH_DIR}"
2020-01-29 13:36:13 +00:00
git config user.email "robot-clickhouse@yandex-team.ru"
git config user.name "robot-clickhouse"
git rm -rf *
cp -R "${BUILD_DIR}"/* .
echo -n "test.clickhouse.tech" > CNAME
2020-01-28 19:47:58 +00:00
echo -n "" > README.md
2020-02-03 10:00:49 +00:00
echo -n "" > ".nojekyll"
2020-01-28 19:31:35 +00:00
cp "${BASE_DIR}/../../LICENSE" .
git add *
2020-02-03 10:00:49 +00:00
git add ".nojekyll"
git commit -a -m "add new release at $(date)"
git push origin master
cd "${BUILD_DIR}"
2020-02-14 10:28:19 +00:00
DOCKER_HASH=$(head -c 16 < /dev/urandom | xxd -p)
else
rm -rf "${BUILD_DIR}" || true
rm -rf "${PUBLISH_DIR}" || true
git clone "${GIT_TEST_URI}" "${BUILD_DIR}"
git clone "${GIT_PROD_URI}" "${PUBLISH_DIR}"
cd "${PUBLISH_DIR}"
git config user.email "robot-clickhouse@yandex-team.ru"
git config user.name "robot-clickhouse"
git rm -rf *
git commit -a -m "wipe old release"
rm -rf "${BUILD_DIR}/.git"
cp -R "${BUILD_DIR}"/* .
echo -n "clickhouse.tech" > CNAME
git add *
git commit -a -m "add new release at $(date)"
git push origin master
CLICKHOUSE-2724: website refactoring (#668) * Split website and doc * Add Host directive to robots.txt * Make new favicon.ico from svg * Reformat code * Add some obscurity to email to limit it's inclusion to email spam databases * Mention SQL in descriptions * Put logo near main title * Add navbar * Update feedback text on tutorial page * Reformat code on tutorial page * Better inline svg * Move javascript to bottom in reference * Mark external links on main & tutorial * Copy footer from main to tutorial * Move Telegram higher * Get rid of hidden content * Update jQuery + add it on index * Rewrite plain JS with jQuery on index * Swap Contacts and Download * Some title tuning * Move Source link to corner * Slow scroll * New first screen * First screen tuning * Add github pages script * Checkout in proper place * more nofollow * Basic mobile support * Add some temporary icon (SIL licensed) * Fix horizontal scroll on mobile * Re-order paragraphs * Sync paragraphs with their index * Add one more grey block * Fix scroll to top * better offset * Reformat code * Add social paragraph * Better word * Font tuning * More font/offset tuning * Increase navbar padding * Basic minify & livereload via gulp * Add styles to default in gulp * Do not minify html in reference * Add og:image header * "build" gulp target * Add readme for website * Max-width for navbar * Use different placeholder * Tune some margins * Do not center buttons * Tune navbar padding * s/an/a/ * Larger font at logo * Increase padding at hero * Yet another placeholder + tune padding on buttons * Basic support for website inside Docker * Listen for IPv6 inside Docker * s/available/enabled/g * nginx tuning * add gzip_min_length * not so dark "fork me" badge * do not commit build results * move "fork me" to right side * Tune styles and texts * tune mobile version * text fix * text fix * text fix * publish presentations * fix navbar styling * fix id name * Support actual deployment to either prod and test * tune logo margin * Mention ClickHouse Docker images * style tuning * disable mix-blend-mode on mobile * copy robots.txt
2017-04-10 14:24:53 +00:00
fi
QLOUD_ENDPOINT="https://platform.yandex-team.ru/api/v1"
QLOUD_PROJECT="clickhouse.clickhouse-website"
if [[ -z "$1" ]]
then
QLOUD_ENV="${QLOUD_PROJECT}.test"
else
QLOUD_ENV="${QLOUD_PROJECT}.prod"
fi
echo ">>> Successfully deployed ${TAG} ${DOCKER_HASH} to ${QLOUD_ENV} <<<"