-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate-rubygems.sh
More file actions
executable file
·51 lines (41 loc) · 1.05 KB
/
update-rubygems.sh
File metadata and controls
executable file
·51 lines (41 loc) · 1.05 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
set -e
#
# Script for updating this project's RubyGems to the latest versions by running `bundle install`
# and committing and pushing the regenerated Gemfile.lock files to GitHub.
#
# Usage: update-rubygems.sh
#
# Author: John Topley (john.topley@ons.gov.uk)
#
echo "Regenerating agent-parent-image/Gemfile.lock..."
cd ./agent-parent-image
rm Gemfile.lock
bundle install
git add Gemfile.lock
git commit -m "Updated dependencies"
git push
echo "Regenerating webapp-parent-image/Gemfile.lock..."
cd ../webapp-parent-image
rm Gemfile.lock
bundle install
git add Gemfile.lock
git commit -m "Updated dependencies"
git push
echo "Waiting 5 minutes for Cloud Build pipeline to build agent-parent-image and webapp-parent-image..."
sleep 300
cd ../agent
rm Gemfile.lock
bundle install
echo "Regenerating agent/Gemfile.lock..."
git add Gemfile.lock
git commit -m "Updated dependencies"
git push
cd ../webapp
rm Gemfile.lock
bundle install
echo "Regenerating webapp/Gemfile.lock..."
git add Gemfile.lock
git commit -m "Updated dependencies"
git push
echo "Finished!"