Skip to content

Commit

Permalink
collect all release assets
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjw806 committed Oct 30, 2023
1 parent 6ca844b commit 35f7c90
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions ci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,15 @@ fi

echo "--- Build connector node"
cd ${REPO_ROOT}/java && mvn -B package -Dmaven.test.skip=true -Dno-build-rust
cd ${REPO_ROOT} && mv ${REPO_ROOT}/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz risingwave-connector-"${BUILDKITE_TAG}".tar.gz
tar -zxvf risingwave-connector-"${BUILDKITE_TAG}".tar.gz libs

if [[ -n "${BUILDKITE_TAG}" ]]; then
echo "--- Collect all release assets"
cd ${REPO_ROOT} && mkdir release-assets && cd release-assets
cp ${REPO_ROOT}/target/release/* .
mv ${REPO_ROOT}/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz risingwave-connector-"${BUILDKITE_TAG}".tar.gz
tar -zxvf risingwave-connector-"${BUILDKITE_TAG}".tar.gz libs
ls -l

echo "--- Install gh cli"
yum install -y dnf
dnf install -y 'dnf-command(config-manager)'
Expand All @@ -80,22 +85,22 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then
gh release create "${BUILDKITE_TAG}" --notes "release ${BUILDKITE_TAG}" -d -p

echo "--- Release upload risingwave asset"
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz ${REPO_ROOT}/target/release/risingwave
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz risingwave
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz

echo "--- Release upload risingwave debug info"
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.dwp.tar.gz ${REPO_ROOT}/target/release/risingwave.dwp
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.dwp.tar.gz risingwave.dwp
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.dwp.tar.gz

echo "--- Release upload risectl asset"
tar -czvf risectl-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz ${REPO_ROOT}/target/release/risectl
tar -czvf risectl-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz risectl
gh release upload "${BUILDKITE_TAG}" risectl-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz

echo "--- Release build and upload risingwave connector node jar asset"
gh release upload "${BUILDKITE_TAG}" ${REPO_ROOT}/risingwave-connector-"${BUILDKITE_TAG}".tar.gz
gh release upload "${BUILDKITE_TAG}" risingwave-connector-"${BUILDKITE_TAG}".tar.gz

echo "--- Release upload risingwave-all-in-one asset"
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux-all-in-one.tar.gz ${REPO_ROOT}/target/release/risingwave ${REPO_ROOT}/libs
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux-all-in-one.tar.gz risingwave libs
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux-all-in-one.tar.gz
fi

Expand Down

0 comments on commit 35f7c90

Please sign in to comment.