Newer
Older
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
#!/bin/bash
set -e
case "$1" in
-h|--help)
echo "Nexus Mods Development Tools"
echo " "
echo "commands:"
echo "down Stops a docker-compose service"
echo "up Starts a docker-compose service in the background"
echo "build Builds the local image(s) for a docker-compose service. Allows docker-compose build arguments"
echo "restart Stops and then starts a docker-compose service"
echo "rebuild Stops, builds and then starts a docker-compose service"
echo "cq, code-quality Runs the nexus code quality tool"
echo "gu, gemfile-updater Runs the gemfile updater tool, outputting common gemfiles in the console"
echo "bu, bundle-update Mounts the Gemfile and lockfile and runs bundle update."
echo "-h, --help show brief help"
exit 0
;;
down)
docker-compose down
;;
up)
docker-compose up -d
;;
build)
shift
docker-compose build "$@"
;;
restart)
docker-compose down && docker-compose up -d
;;
rebuild)
docker-compose down && docker-compose build && docker-compose up -d
;;
cq|code-quality)
shift
docker run -v "$PWD":/app/mounted gitlab.nexdev.uk:5555/pub/nexus-code-quality/master "$@"
;;
gu|gemfile-updater)
shift
docker run -it -v "$(pwd)":/app -v /usr/local/bundle:/usr/local/bundle gitlab.nexdev.uk:5555/pub/base-image-gemfile-updater:v1.1.1 "$@"
;;
bu|bundle-update)
shift
docker run -it -v "$(pwd)":/app -v /usr/local/bundle:/usr/local/bundle gitlab.nexdev.uk:5555/pub/bundle-updater:v1.0.1 "$@"
echo "Container now must be rebuilt!"
;;
update)
shift
wget https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/run.sh -O ~/nexus-tools.sh
echo "Container now must be rebuilt!"
;;