Skip to content

Commit 9d0c265

Browse files
authored
Merge pull request #2 from cloudskiff/dockerfile
Add .gitignore and make progress bar silent with dctlenv v0.1.4
2 parents 4d238f2 + eb7e405 commit 9d0c265

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.dockerignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.git
2+
.github
3+
.gitignore
4+
.idea
5+
LICENSE
6+
README.md
7+
action.yml
8+
tests

entrypoint.sh

+17-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ log_error() {
77

88
install_driftctl() {
99
echo "Installing dctlenv"
10-
git clone --depth 1 --branch v0.1.3 https://github.com/wbeuil/dctlenv ~/.dctlenv
10+
git clone --depth 1 --branch v0.1.4 https://github.com/wbeuil/dctlenv ~/.dctlenv
1111
export PATH="$HOME/.dctlenv/bin:$PATH"
1212
gpg --keyserver hkps.pool.sks-keyservers.net --recv-keys 0xACC776A79C824EBD
1313

1414
echo "Downloading driftctl:$version"
15-
DCTLENV_PGP=1 dctlenv use $version
15+
DCTLENV_PGP=1 DCTLENV_CURL=1 dctlenv use $version
1616
}
1717

1818
parse_inputs() {
@@ -24,11 +24,25 @@ parse_inputs() {
2424
fi
2525
}
2626

27+
quiet_flag() {
28+
case "${version/v/}" in
29+
"0.1.0"|"0.1.1"|"0.2.0"|"0.2.1"|"0.2.2"|"0.2.3"|"0.3.0"|"0.3.1"|"0.4.0"|"0.5.0"|"0.6.0")
30+
;;
31+
*)
32+
qflag="--quiet"
33+
;;
34+
esac
35+
}
36+
2737
# First we need to parse inputs
2838
parse_inputs
2939

3040
# Then we install the requested driftctl binary
3141
install_driftctl
3242

43+
# We check if the version of driftctl needs the quiet flag
44+
qflag=""
45+
quiet_flag
46+
3347
# Finally we run the scan command
34-
driftctl scan
48+
driftctl scan $qflag

0 commit comments

Comments
 (0)