Skip to content

Commit 20813f0

Browse files
committed
Publish
1 parent d82275e commit 20813f0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

maps-tools

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
#needs to increment on every change!!!
4-
#version: 41
4+
#version: 42
55
#initialize variables
66
readonly DEFAULT_DOCKER_IMAGE_REGISTRY="ghcr.io/spring-media"
77
readonly DEFAULT_DOCKER_IMAGE_NAME=maps-tools
@@ -68,6 +68,7 @@ function print_usage() {
6868
echo '-u: update maps-tools and docker image (force pull), to get testing versions use "-u testing"'
6969
echo '-x: start with kubernetes dashboard http://0.0.0.0:7777/'
7070
echo '-s: start a container with individual kube context'
71+
echo '--version: Print maps-tools script version and exit'
7172

7273
echo
7374

@@ -272,6 +273,13 @@ function cleanup_configs() {
272273
done
273274
}
274275

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+
275283
# Parse flags
276284
while getopts "b:o:he:ivdaucsx" argument; do
277285
case "${argument}" in

0 commit comments

Comments
 (0)