Skip to content
Snippets Groups Projects
Commit 1666fdf1 authored by Mirco's avatar Mirco
Browse files

fix build script for CircleCI

parent fcf39c34
No related branches found
No related tags found
No related merge requests found
......@@ -11,4 +11,3 @@ search = <version>{current_version}</version><!-- BUMP_VERSION -->
replace = <version>{new_version}</version><!-- BUMP_VERSION -->
[bumpversion:file:hbp.yml]
#!/usr/bin/env bash
set -e
set -o pipefail # trace ERR through pipes
set -o errtrace # trace ERR through 'time command' and other functions
set -o errexit ## set -e : exit the script if any statement returns a non-true return value
get_script_dir () {
SOURCE="${BASH_SOURCE[0]}"
......@@ -13,19 +16,17 @@ get_script_dir () {
pwd
}
if pgrep -lf sshuttle > /dev/null ; then
echo "sshuttle detected. Please close this program as it messes with networking and prevents builds inside Docker to work"
exit 1
fi
cd "$(get_script_dir)"
if groups $USER | grep &>/dev/null '\bdocker\b'; then
if [[ $NO_SUDO || -n "$CIRCLECI" ]]; then
CAPTAIN="captain"
elif groups $USER | grep &>/dev/null '\bdocker\b'; then
CAPTAIN="captain"
else
CAPTAIN="sudo captain"
fi
BUILD_DATE=$(date --iso-8601=seconds) \
BUILD_DATE=$(date -Iseconds) \
VCS_REF=$(git describe --tags --dirty) \
VERSION=$(git describe --tags --dirty) \
WORKSPACE=$(get_script_dir) \
$CAPTAIN build
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment