forked from connectomicslab/connectomemapper3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_bidsapp.sh
executable file
·31 lines (26 loc) · 1008 Bytes
/
build_bidsapp.sh
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
#!/bin/sh
# Copyright (C) 2009-2021, Ecole Polytechnique Federale de Lausanne (EPFL) and
# Hospital Center and University of Lausanne (UNIL-CHUV), Switzerland, and CMP3 contributors
# All rights reserved.
#
# This software is distributed under the open-source license Modified BSD.
# Build the docker image of Connectome Mapper 3.
#
# Usage /bin/sh build_bidsapp.sh
#
# Created by Sebastien Tourbier
# Source: https://github.com/connectomicslab/connectomemapper3/blob/master/build_bidsapp.sh
# Get the current date and time
CMP_BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo "$CMP_BUILD_DATE"
# Get Connectome Mapper 3 version
VERSION=$(python get_version.py)
echo "$VERSION"
# Get the version control commit hash
VCS_REF=$(git rev-parse --verify HEAD)
echo "$VCS_REF"
# Build the Docker image
docker build --rm --build-arg BUILD_DATE="$CMP_BUILD_DATE "\
--build-arg VCS_REF="$VCS_REF" \
--build-arg VERSION="$VERSION" \
-t sebastientourbier/connectomemapper-bidsapp:"${VERSION}" .