forked from eclipse-che/che-machine-exec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.sh
More file actions
executable file
·28 lines (22 loc) · 731 Bytes
/
compile.sh
File metadata and controls
executable file
·28 lines (22 loc) · 731 Bytes
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
#!/bin/bash
#
# Copyright (c) 2019-2021 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#
function compile() {
echo "===> Compile che-machine-exec binary from source code. <===";
$(CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec .);
if [ $? != 0 ]; then
echo "Failed to compile code";
exit 0;
fi
echo "============ Compilation successfully completed. ============";
}
compile;