File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
# needs to increment on every change!!!
4
- # version: 41
4
+ # version: 42
5
5
# initialize variables
6
6
readonly DEFAULT_DOCKER_IMAGE_REGISTRY=" ghcr.io/spring-media"
7
7
readonly DEFAULT_DOCKER_IMAGE_NAME=maps-tools
@@ -68,6 +68,7 @@ function print_usage() {
68
68
echo ' -u: update maps-tools and docker image (force pull), to get testing versions use "-u testing"'
69
69
echo ' -x: start with kubernetes dashboard http://0.0.0.0:7777/'
70
70
echo ' -s: start a container with individual kube context'
71
+ echo ' --version: Print maps-tools script version and exit'
71
72
72
73
echo
73
74
@@ -272,6 +273,13 @@ function cleanup_configs() {
272
273
done
273
274
}
274
275
276
+ # Handle --version flag before proceeding
277
+ if [[ " $1 " == " --version" ]]; then
278
+ version=$( grep -m 1 " #version:" " $0 " | awk ' {print $2}' )
279
+ echo " maps-tools version: $version "
280
+ exit 0
281
+ fi
282
+
275
283
# Parse flags
276
284
while getopts " b:o:he:ivdaucsx" argument; do
277
285
case " ${argument} " in
You can’t perform that action at this time.
0 commit comments