File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,14 @@ RUN . ~/.nix-profile/etc/profile.d/nix.sh \
46
46
# TODO: Could just use a nix-shell and garbage collect (e.g. git, unzip, sbt) after the installations ...
47
47
RUN . ~/.nix-profile/etc/profile.d/nix.sh \
48
48
&& mkdir repos && cd repos \
49
- && git clone --branch $SBT_VERIFY_TAG --depth=1 https://github.com/input-output-hk/sbt-verify.git \
49
+ && git clone https://github.com/input-output-hk/sbt-verify.git \
50
50
&& cd sbt-verify \
51
+ && git checkout $SBT_VERIFY_TAG \
51
52
&& sbt publishLocal \
52
53
&& cd - \
53
- && git clone --branch $MANTIS_TAG --depth=1 https://github.com/input-output-hk/mantis.git \
54
+ && git clone https://github.com/input-output-hk/mantis.git \
54
55
&& cd mantis \
56
+ && git checkout $MANTIS_TAG \
55
57
&& git submodule update --init \
56
58
&& sbt 'set test in Test := {}' dist \
57
59
&& mkdir -p ~/mantis-dist/app \
Original file line number Diff line number Diff line change 3
3
set -eux
4
4
5
5
HERE=$( readlink -m $( dirname ${BASH_SOURCE[0]} ) )
6
- DATE_TAG=$( date --iso-8601)
7
- TAG=${1:- $DATE_TAG }
8
6
9
- docker build -t mantis:$TAG $HERE
7
+ IMAGE_NAME=mantis
8
+ DOCKERFILE=Dockerfile
9
+
10
+ # If IMAGE_TAG is not given in the command line, then compute one in the format
11
+ #
12
+ # YYYY-MM-DD '.' SHORT_HASH
13
+ #
14
+ # where the variable parts refer to the latest commit
15
+ IMAGE_TAG=${1:- $(git log -1 --format=% cd.% h --date=short)}
16
+
17
+ # This is the commit that the image will be based on
18
+ COMMIT=$( git log -1 --format=%H)
19
+
20
+ docker build --build-arg MANTIS_TAG=${COMMIT} -t $IMAGE_NAME :$IMAGE_TAG -f $HERE /$DOCKERFILE $HERE
You can’t perform that action at this time.
0 commit comments