-
Notifications
You must be signed in to change notification settings - Fork 22
/
build
executable file
·35 lines (26 loc) · 944 Bytes
/
build
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
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
#
# SPDX-FileCopyrightText: 2018 SAP SE or an SAP affiliate company and Gardener contributors
#
# SPDX-License-Identifier: Apache-2.0
set -e
# For the build step concourse will set the following environment variables:
# SOURCE_PATH - path to component repository root directory.
# BINARY_PATH - path to an existing (empty) directory to place build results into.
if [[ -z "${SOURCE_PATH}" ]]; then
export SOURCE_PATH="$(readlink -f "$(dirname ${0})/..")"
else
export SOURCE_PATH="$(readlink -f "${SOURCE_PATH}")"
fi
source "$SOURCE_PATH/build/setupenv.src"
if [ -z "$CMD" ]; then
CMD="$EXE"
fi
echo WORKDIR="$(pwd)"
###############################################################################
VERSION_FILE="$(readlink -f "${SOURCE_PATH}/VERSION")"
VERSION="$(cat "${VERSION_FILE}")"
echo "running code generator..."
make generate
echo "running build..."
make -e EXECUTABLE="${BINARY_PATH}/rel/$EXE" release