1+ #! /usr/bin/env bash
2+
3+ #
4+ # Licensed to the Apache Software Foundation (ASF) under one
5+ # or more contributor license agreements. See the NOTICE file
6+ # distributed with this work for additional information
7+ # regarding copyright ownership. The ASF licenses this file
8+ # to you under the Apache License, Version 2.0 (the
9+ # "License"); you may not use this file except in compliance
10+ # with the License. You may obtain a copy of the License at
11+ #
12+ # http://www.apache.org/licenses/LICENSE-2.0
13+ #
14+ # Unless required by applicable law or agreed to in writing, software
15+ # distributed under the License is distributed on an "AS IS" BASIS,
16+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+ # See the License for the specific language governing permissions and
18+ # limitations under the License.
19+ #
20+
21+ # #
22+ # # Variables with defaults (if not overwritten by environment)
23+ # #
24+ MVN=${MVN:- mvn}
25+
26+ if [ -z " ${RELEASE_VERSION:- } " ]; then
27+ echo " RELEASE_VERSION was not set."
28+ exit 1
29+ fi
30+
31+ # fail immediately
32+ set -o errexit
33+ set -o nounset
34+ # print command before executing
35+ set -o xtrace
36+
37+ CURR_DIR=` pwd`
38+ if [[ ` basename $CURR_DIR ` != " tools" ]] ; then
39+ echo " You have to call the script from the tools/ dir"
40+ exit 1
41+ fi
42+
43+ if [ " $( uname) " == " Darwin" ]; then
44+ SHASUM=" shasum -a 512"
45+ # turn off xattr headers in the generated archive file on macOS
46+ TAR_OPTIONS=" --no-xattrs"
47+ # Disable the creation of ._* files on macOS.
48+ export COPYFILE_DISABLE=1
49+ else
50+ SHASUM=" sha512sum"
51+ TAR_OPTIONS=" "
52+ fi
53+
54+ # ##########################
55+
56+ cd ..
57+
58+ FLUSS_DIR=` pwd`
59+ HELM_RELEASE_DIR=${FLUSS_DIR} /tools/release/helm-chart/${RELEASE_VERSION} -rc${RELEASE_CANDIDATE}
60+
61+ echo " Creating helm chart package"
62+
63+ mkdir -p ${HELM_RELEASE_DIR}
64+
65+ cd ${HELM_RELEASE_DIR}
66+
67+ # create helm package tgz for fluss
68+ helm package ${FLUSS_DIR} /docker/helm
69+ # create prov file for helm package
70+ helm gpg sign fluss-${RELEASE_VERSION} .tgz
71+
72+ # create sha512 and asc files
73+ $SHASUM fluss-${RELEASE_VERSION} .tgz > fluss-${RELEASE_VERSION} .tgz.sha512
74+ $SHASUM fluss-${RELEASE_VERSION} .tgz.prov > fluss-${RELEASE_VERSION} .tgz.prov.sha512
75+ gpg --armor --detach-sig ${HELM_RELEASE_DIR} /fluss-$RELEASE_VERSION .tgz
76+ gpg --armor --detach-sig ${HELM_RELEASE_DIR} /fluss-$RELEASE_VERSION .tgz.prov
77+
78+ # create index.yaml
79+ cd ..
80+ helm repo index .
0 commit comments