forked from Altinity/clickhouse-grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
27 lines (27 loc) · 820 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
set -xeuo pipefail
if [[ $# -lt 1 ]]; then
echo "release.sh [major|minor|patch]"
exit 1
fi
if [[ $OSTYPE == *linux* ]]; then
echo 1 > /proc/sys/vm/drop_caches || true
fi
source .release_env
git config core.eol lf
git config core.autocrlf input
git config user.name "$GITHUB_LOGIN"
git config user.email "$GITHUB_EMAIL"
docker-compose stop
docker-compose run --rm frontend_builder
docker-compose run --rm backend_builder
dos2unix ./dist/*
chmod +rx ./dist
chmod +rx -R ./dist/altinity-clickhouse-plugin*
git add .
git diff-index --quiet HEAD || git commit -m "prepare to new release, $(grep current_version .bumpversion.cfg)"
bump2version --verbose $1
docker-compose run --rm plugin_signer
git add .
git commit -s -m "sign plugin, $(grep current_version .bumpversion.cfg)"
git push --tags