-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-audit.sh
More file actions
36 lines (28 loc) · 813 Bytes
/
docker-audit.sh
File metadata and controls
36 lines (28 loc) · 813 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
29
30
31
32
33
34
35
36
#!/bin/bash
set -e
# NOTE: This script is to be used ONLY in a Docker container or in Travis.
echo '-------------------'
echo 'gem install bundler'
gem install bundler
# BEGIN: changing the Gemfile
STR1="gem 'bundler-audit'"
STR2="# $STR1"
sed -i.bak "s|$STR2|$STR1|g" Gemfile
rm Gemfile.bak
# END: changing the Gemfile
echo '----------------------'
echo 'bundle install --quiet'
bundle install --quiet
echo '-------------------------------'
echo 'bundle exec bundle-audit update'
bundle exec bundle-audit update
echo '------------------------'
echo 'bundle exec bundle-audit'
bundle exec bundle-audit
# BEGIN: changing the Gemfile back
sed -i.bak "s|$STR1|$STR2|g" Gemfile
rm Gemfile.bak
# END: changing the Gemfile back
echo '----------------------'
echo 'bundle install --quiet'
bundle install --quiet